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
3f670438
Commit
3f670438
authored
Aug 10, 2021
by
lihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: pic
parent
e1230bc7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
193 additions
and
156 deletions
+193
-156
index.vue
src/pages/Activity/Manage/index.vue
+153
-140
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+30
-11
index.vue
src/pages/Activity/releaseProduc/index.vue
+10
-5
No files found.
src/pages/Activity/Manage/index.vue
View file @
3f670438
<
template
>
<div
class=
"manage-wrapper"
v-loading=
"tableLoading"
element-loading-text=
"拼命加载中"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
<el-form
ref=
"form"
:model=
"activity"
inline
label-width=
"80px"
class=
"form-wrapper"
<layout>
<div
class=
"manage-wrapper"
v-loading=
"tableLoading"
element-loading-text=
"拼命加载中"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
<!-- 表单控件 -->
<div
class=
"formitem-wrapper"
>
<el-form-item
label=
"活动名称"
>
<el-input
v-model=
"activity.activityName"
></el-input>
</el-form-item>
<el-form-item
label=
"活动状态"
>
<el-select
v-model=
"activity.online_status"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item
style=
"margin-left: 50px"
>
<el-button
type=
"primary"
@
click=
"getActivityList"
>
搜索
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"goReleaseProduc"
>
发布拼单
</el-button
>
</el-form-item>
</div>
<el-form
ref=
"form"
:model=
"activity"
inline
label-width=
"80px"
class=
"form-wrapper"
>
<!-- 表单控件 -->
<div
class=
"formitem-wrapper"
>
<el-form-item
label=
"活动名称"
>
<el-input
v-model=
"activity.activityName"
></el-input>
</el-form-item>
<el-form-item
label=
"活动状态"
>
<el-select
v-model=
"activity.online_status"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item
style=
"margin-left: 50px"
>
<el-button
type=
"primary"
@
click=
"getActivityList"
>
搜索
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"goReleaseProduc"
>
发布拼单
</el-button
>
</el-form-item>
</div>
<!-- 列表 -->
<div
class=
"table-wrapper"
>
<el-table
:data=
"tableActivityList"
border
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"activiteId"
label=
"活动ID"
width=
"width"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"activiteHead"
label=
"活动标题"
width=
"width"
>
<template
#
default=
"scope"
>
<div
@
click=
"handleHeadline(scope.row)"
class=
"activityTitle"
>
<div>
{{
scope
.
row
.
activiteHead
}}
<!-- 列表 -->
<div
class=
"table-wrapper"
>
<el-table
:data=
"tableActivityList"
border
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"activiteId"
label=
"活动ID"
width=
"width"
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"activiteHead"
label=
"活动标题"
width=
"width"
>
<template
#
default=
"scope"
>
<div
@
click=
"handleHeadline(scope.row)"
class=
"activityTitle"
>
<div>
{{
scope
.
row
.
activiteHead
}}
</div>
<div
class=
"activityPrice"
>
{{
scope
.
row
.
minPrice
===
scope
.
row
.
maxPrice
?
` ¥ ${scope.row.minPrice
}
`
:
` ¥ ${scope.row.minPrice
}
~¥${scope.row.maxPrice
}
`
}}
<
/div
>
<
/div
>
<div
class=
"activityPrice"
>
{{
scope
.
row
.
minPrice
===
scope
.
row
.
maxPrice
?
` ¥ ${scope.row.minPrice
}
`
:
` ¥ ${scope.row.minPrice
}
~¥${scope.row.maxPrice
}
`
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
prop
=
"activiteStatus"
label
=
"活动状态"
width
=
"width"
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
prop
=
"orderNumber"
label
=
"订单数量"
width
=
"width"
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
prop
=
"scope"
label
=
"操作"
width
=
"250"
>
<
template
#
default
=
"scope"
>
<
div
class
=
"button-one"
>
<
el
-
button
type
=
"primary"
size
=
"small"
@
click
=
"handleModify(scope.row)"
>
修改
<
/el-butto
n
>
<
el
-
popconfirm
title
=
"确定要结束本次拼单吗?"
@
confirm
=
"updateActivity"
>
<
template
#
reference
>
<
el
-
button
v
-
show
=
"scope.row.status === 1"
type
=
"primary"
size
=
"small"
@
click
=
"handleEnd(scope.row)"
>
结束
<
/el-butto
n
>
<
/template
>
<
/el-popconfirm
>
<
el
-
popconfirm
title
=
"确定要开启本次拼单吗?"
@
confirm
=
"updateActivity"
>
<
template
#
reference
>
<
el
-
button
v
-
show
=
"
scope.row.status === 2 || scope.row.status === 3
"
type
=
"primary"
size
=
"small"
@
click
=
"handleStart(scope.row)"
>
开始
<
/el-butto
n
>
<
/template
>
<
/el-popconfirm
>
<
/div
>
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
prop
=
"activiteStatus"
label
=
"活动状态"
width
=
"width"
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
prop
=
"orderNumber"
label
=
"订单数量"
width
=
"width"
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"center"
prop
=
"scope"
label
=
"操作"
width
=
"250"
>
<
template
#
default
=
"scope"
>
<
div
class
=
"button-one"
>
<
el
-
button
class
=
"checkButton"
type
=
"primary"
size
=
"small"
@
click
=
"handle
Modify
(scope.row)"
>
修改
<
/el-butto
n
@
click
=
"handle
Look
(scope.row)"
>
查看订单
<
/el-butto
n
>
<
el
-
popconfirm
title
=
"确定要结束本次拼单吗?"
@
confirm
=
"updateActivity"
>
<
template
#
reference
>
<
el
-
button
v
-
show
=
"scope.row.status === 1"
type
=
"primary"
size
=
"small"
@
click
=
"handleEnd(scope.row)"
>
结束
<
/el-butto
n
>
<
/template
>
<
/el-popconfirm
>
<
el
-
popconfirm
title
=
"确定要开启本次拼单吗?"
@
confirm
=
"updateActivity"
>
<
template
#
reference
>
<
el
-
button
v
-
show
=
"scope.row.status === 2 || scope.row.status === 3"
type
=
"primary"
size
=
"small"
@
click
=
"handleStart(scope.row)"
>
开始
<
/el-butto
n
>
<
/template
>
<
/el-popconfirm
>
<
/div
>
<
el
-
button
class
=
"checkButton"
type
=
"primary"
size
=
"small"
@
click
=
"handleLook(scope.row)"
>
查看订单
<
/el-butto
n
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
/div
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
/div
>
<!--
分页
-->
<
div
class
=
"pagination-wrapper"
>
<
el
-
pagination
background
layout
=
"prev, pager, next"
:
total
=
"pageCount"
:
page
-
size
=
"10"
@
current
-
change
=
"handleCurrentChange"
>
<
/el-pagination
>
<
/div
>
<
/el-form
>
<
/div
>
<!--
分页
-->
<
div
class
=
"pagination-wrapper"
>
<
el
-
pagination
background
layout
=
"prev, pager, next"
:
total
=
"pageCount"
:
page
-
size
=
"10"
@
current
-
change
=
"handleCurrentChange"
>
<
/el-pagination
>
<
/div
>
<
/el-form
>
<
/div
>
<
/layout
>
<
/template
>
<
script
>
import
{
layout
}
from
"../../Groupmeal/layout/index.vue"
;
import
{
ElMessage
}
from
"element-plus"
;
import
ActivityService
from
"@/service/Activity/index"
;
import
dayJs
from
"dayjs"
;
...
...
@@ -174,6 +184,9 @@ export default {
]
}
;
}
,
components
:
{
layout
}
,
methods
:
{
/* API */
// 获取商品列表
...
...
@@ -286,7 +299,7 @@ export default {
marketing_id
:
val
.
activiteId
,
online_status
:
2
,
// 1 启用 2 关闭
end_time
:
dayJs
().
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
;
}
;
}
,
// 开始
handleStart
(
val
)
{
...
...
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
3f670438
...
...
@@ -45,7 +45,12 @@ export default {
props
:
{
infoEditArr
:
{
type
:
Object
,
defult
:
()
=>
{}
default
:
()
=>
{
return
{
pindan_pic_url
:
[]
};
},
require
:
true
}
},
data
()
{
...
...
@@ -54,11 +59,10 @@ export default {
title
:
""
,
// 标题
desc
:
""
,
// 介绍
picUploadList
:
[],
// 上传详情图片列表
picUrlList
:
[]
// 图片回显列表
picUrlList
:
[],
// 图片回显列表
picSubmitList
:
[]
// 发布功能需要的图片列表
},
propData
:
{},
isShowPopver
:
false
,
// 是否展示图片框
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
// 金山云上传地址
};
...
...
@@ -66,15 +70,20 @@ export default {
watch
:
{
infoEditArr
:
{
// 监听props属性 展示自提点列表
handler
:
async
function
(
newVal
)
{
handler
:
function
(
newVal
)
{
console
.
log
(
99
);
if
(
this
.
$route
.
query
.
marketing_id
)
{
this
.
propData
=
newVal
;
this
.
infoEditForm
.
title
=
this
.
propData
.
marketing_name
;
this
.
infoEditForm
.
desc
=
this
.
propData
.
pindan_desc
;
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
});
// console.log(newVal.pindan_pic_url.length);
// console.log(oldVal);
if
(
newVal
.
pindan_pic_url
)
{
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
});
}
}
}
},
...
...
@@ -91,16 +100,26 @@ export default {
// 图片上传成功时
handleDetailSuccess
(
res
)
{
this
.
infoEditForm
.
picUploadList
.
push
(
res
.
result
.
image_id
);
this
.
infoEditForm
.
picUploadList
.
push
(
res
.
result
.
image_id
);
// 上传成功图片的id
// this.infoEditForm.picUrlList.push({
// // 回显图片列表
// url: res.result.url
// });
},
// 图片删除后
removeDetailFiles
(
file
,
fileList
)
{
for
(
let
i
=
0
;
i
<
fileList
.
length
;
i
++
)
{
if
(
fileList
[
i
].
uid
==
file
.
uid
)
{
this
.
infoEditForm
.
picU
pload
List
.
splice
(
i
,
1
);
this
.
infoEditForm
.
picU
rl
List
.
splice
(
i
,
1
);
}
}
// for (let i = 0; i
<
fileList
.
length
;
i
++
)
{
// if (fileList[i].uid == file.uid) {
// this.infoEditForm.picUploadList.splice(i, 1);
// }
// }
},
// 获取营销活动详情
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
3f670438
...
...
@@ -21,8 +21,8 @@
<addProduc
ref=
"addProduc"
v-show=
"active === 2"
:editInfo=
"infoEditArr"
:addProduc=
"addProducArr"
:editInfo=
"infoEditArr"
/>
<spellOrderSet
ref=
"spellOrderSet"
...
...
@@ -93,7 +93,7 @@ export default {
ElMessage
.
error
(
"请填写商品标题"
);
return
;
}
this
.
infoEditArr
.
title
=
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
;
//
this.infoEditArr.title = this.$refs.infoEdit.infoEditForm.title;
this
.
active
=
2
;
}
else
if
(
this
.
active
===
2
)
{
if
(
this
.
$refs
.
addProduc
.
comTableData
.
length
==
0
)
{
...
...
@@ -131,6 +131,13 @@ export default {
// 确认发布
async
confirmRelease
()
{
let
list
=
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUrlList
.
map
(
item
=>
{
console
.
log
(
item
);
return
item
.
url
;
});
console
.
log
(
list
);
let
picList
=
list
.
join
(
","
);
console
.
log
(
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUrlList
);
for
(
var
i
in
this
.
addProducArr
)
{
this
.
goodsSkuIDArr
.
push
(
this
.
addProducArr
[
i
].
goods_sku_id
);
}
...
...
@@ -147,9 +154,7 @@ export default {
op_cur_user
:
store
.
state
.
userInfo
.
email
,
start_time
:
this
.
startDate
,
end_time
:
this
.
endDate
,
pindan_pic
:
this
.
infoEditArr
.
pindan_pic_url
?
this
.
infoEditArr
.
pindan_pic_url
:
[].
concat
(
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUploadList
).
join
(
","
),
pindan_pic
:
picList
,
pindan_desc
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
desc
,
take_place_ids
:
this
.
takePlaceIDArr
};
...
...
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