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
dc24f027
Commit
dc24f027
authored
Sep 02, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 配置商品回显
parent
9c37bb18
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
678 additions
and
383 deletions
+678
-383
spellOrderSet.vue
...pages/Activity/releaseProduc/components/spellOrderSet.vue
+391
-7
index.vue
src/pages/Groupmeal/Marketing/index.vue
+264
-267
index.vue
src/pages/Groupmeal/headManagement/index.vue
+23
-109
No files found.
src/pages/Activity/releaseProduc/components/spellOrderSet.vue
View file @
dc24f027
...
@@ -443,6 +443,347 @@
...
@@ -443,6 +443,347 @@
<
/style
>
<
/style
>
<
style
lang
=
"less"
scoped
>
<
style
lang
=
"less"
scoped
>
.
spell_order_set_wrapper
{
.
spell_order_set_wrapper
{
//text-align: center;
// 时间选择
.
datepickerWrapper
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
flex
-
wrap
:
wrap
;
.
demonstration
{
margin
:
20
px
;
}
/deep/
.
start_time_picker
{
margin
:
20
px
;
}
/deep/
.
end_time_picker
{
margin
:
20
px
;
}
}
.
add_takePlace_dialog
{
.
location_wrapper
{
/
deep
/
.
el
-
form
-
item__content
{
width
:
calc
(
100
%
-
120
px
);
display
:
inline
-
flex
;
flex
-
wrap
:
wrap
;
}
.
location_input_wrapper
{
width
:
60
%
;
min
-
width
:
178
px
;
}
.
location_text_wrapper
{
width
:
40
%
;
}
}
}
//添加自提点dialog
@
media
screen
and
(
max
-
width
:
800
px
)
{
/
deep
/
.
add_takePlace_dialog
{
width
:
100
%
!
important
;
}
}
}
.
card
-
wrapper
{
width
:
100
%
;
.
search_form_wrapper
{
text
-
align
:
center
;
.
title
{
height
:
50
px
;
line
-
height
:
30
px
;
}
}
// table 自提点表格
.
tabla
-
wrapper
{
>
p
{
margin
-
left
:
10
px
;
text
-
align
:
left
;
}
.
tableList
{
height
:
600
px
;
.
delete_button
{
margin
:
0
;
}
}
}
}
.
pagination
-
wrapper
{
height
:
60
px
;
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
.
tabList
{
margin
-
top
:
10
px
;
}
.
location
{
margin
-
bottom
:
10
px
;
margin
-
left
:
14
%
;
}
.
dialog
-
footer
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
/deep/
.
el
-
dialog__body
{
height
:
85
%
!
important
;
}
/deep/
.
mapDialog
{
margin
-
top
:
10
vh
!
important
;
height
:
80
%
;
display
:
flex
!
important
;
flex
-
direction
:
column
!
important
;
/deep/
.
el
-
dialog__body
{
height
:
90
%
;
}
}
.
spell_order_set_wrapper
{
//text-align: center;
// 时间选择
.
datepickerWrapper
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
flex
-
wrap
:
wrap
;
.
demonstration
{
margin
:
20
px
;
}
/deep/
.
start_time_picker
{
margin
:
20
px
;
}
/deep/
.
end_time_picker
{
margin
:
20
px
;
}
}
.
add_takePlace_dialog
{
.
location_wrapper
{
/
deep
/
.
el
-
form
-
item__content
{
width
:
calc
(
100
%
-
120
px
);
display
:
inline
-
flex
;
flex
-
wrap
:
wrap
;
}
.
location_input_wrapper
{
width
:
60
%
;
min
-
width
:
178
px
;
}
.
location_text_wrapper
{
width
:
40
%
;
}
}
}
//添加自提点dialog
@
media
screen
and
(
max
-
width
:
800
px
)
{
/
deep
/
.
add_takePlace_dialog
{
width
:
100
%
!
important
;
}
}
}
.
card
-
wrapper
{
width
:
100
%
;
.
search_form_wrapper
{
text
-
align
:
center
;
.
title
{
height
:
50
px
;
line
-
height
:
30
px
;
}
}
// table 自提点表格
.
tabla
-
wrapper
{
>
p
{
margin
-
left
:
10
px
;
text
-
align
:
left
;
}
.
tableList
{
height
:
600
px
;
.
delete_button
{
margin
:
0
;
}
}
}
}
.
pagination
-
wrapper
{
height
:
60
px
;
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
.
tabList
{
margin
-
top
:
10
px
;
}
.
location
{
margin
-
bottom
:
10
px
;
margin
-
left
:
14
%
;
}
.
dialog
-
footer
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
/deep/
.
el
-
dialog__body
{
height
:
85
%
!
important
;
}
/deep/
.
mapDialog
{
margin
-
top
:
10
vh
!
important
;
height
:
80
%
;
display
:
flex
!
important
;
flex
-
direction
:
column
!
important
;
/deep/
.
el
-
dialog__body
{
height
:
90
%
;
}
}
.
datepickerWrapper
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
flex
-
wrap
:
wrap
;
.
demonstration
{
margin
:
20
px
;
}
/deep/
.
start_time_picker
{
margin
:
20
px
;
}
/deep/
.
end_time_picker
{
margin
:
20
px
;
}
}
.
add_takePlace_dialog
{
.
location_wrapper
{
/
deep
/
.
el
-
form
-
item__content
{
width
:
calc
(
100
%
-
120
px
);
display
:
inline
-
flex
;
flex
-
wrap
:
wrap
;
}
.
location_input_wrapper
{
width
:
60
%
;
min
-
width
:
178
px
;
}
.
location_text_wrapper
{
width
:
40
%
;
}
}
}
.
spell_order_set_wrapper
{
//text-align: center;
// 时间选择
.
datepickerWrapper
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
flex
-
wrap
:
wrap
;
.
demonstration
{
margin
:
20
px
;
}
/deep/
.
start_time_picker
{
margin
:
20
px
;
}
/deep/
.
end_time_picker
{
margin
:
20
px
;
}
}
.
add_takePlace_dialog
{
.
location_wrapper
{
/
deep
/
.
el
-
form
-
item__content
{
width
:
calc
(
100
%
-
120
px
);
display
:
inline
-
flex
;
flex
-
wrap
:
wrap
;
}
.
location_input_wrapper
{
width
:
60
%
;
min
-
width
:
178
px
;
}
.
location_text_wrapper
{
width
:
40
%
;
}
}
}
//添加自提点dialog
@
media
screen
and
(
max
-
width
:
800
px
)
{
/
deep
/
.
add_takePlace_dialog
{
width
:
100
%
!
important
;
}
}
}
.
card
-
wrapper
{
width
:
100
%
;
.
search_form_wrapper
{
text
-
align
:
center
;
.
title
{
height
:
50
px
;
line
-
height
:
30
px
;
}
}
// table 自提点表格
.
tabla
-
wrapper
{
>
p
{
margin
-
left
:
10
px
;
text
-
align
:
left
;
}
.
tableList
{
height
:
600
px
;
.
delete_button
{
margin
:
0
;
}
}
}
}
.
pagination
-
wrapper
{
height
:
60
px
;
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
.
tabList
{
margin
-
top
:
10
px
;
}
.
location
{
margin
-
bottom
:
10
px
;
margin
-
left
:
14
%
;
}
.
dialog
-
footer
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
/deep/
.
el
-
dialog__body
{
height
:
85
%
!
important
;
}
/deep/
.
mapDialog
{
margin
-
top
:
10
vh
!
important
;
height
:
80
%
;
display
:
flex
!
important
;
flex
-
direction
:
column
!
important
;
/deep/
.
el
-
dialog__body
{
height
:
90
%
;
}
}
@
media
screen
and
(
max
-
width
:
800
px
)
{
/
deep
/
.
add_takePlace_dialog
{
width
:
100
%
!
important
;
}
}
}
.
card
-
wrapper
{
width
:
100
%
;
.
search_form_wrapper
{
text
-
align
:
center
;
.
title
{
height
:
50
px
;
line
-
height
:
30
px
;
}
}
.
spell_order_set_wrapper
{
.
spell_order_set_wrapper
{
//text-align: center;
//text-align: center;
// 时间选择
// 时间选择
...
@@ -541,4 +882,47 @@
...
@@ -541,4 +882,47 @@
height
:
90
%
;
height
:
90
%
;
}
}
}
}
.
tabla
-
wrapper
{
>
p
{
margin
-
left
:
10
px
;
text
-
align
:
left
;
}
.
tableList
{
height
:
600
px
;
.
delete_button
{
margin
:
0
;
}
}
}
}
.
pagination
-
wrapper
{
height
:
60
px
;
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
.
tabList
{
margin
-
top
:
10
px
;
}
.
location
{
margin
-
bottom
:
10
px
;
margin
-
left
:
14
%
;
}
.
dialog
-
footer
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
/deep/
.
el
-
dialog__body
{
height
:
85
%
!
important
;
}
/deep/
.
mapDialog
{
margin
-
top
:
10
vh
!
important
;
height
:
80
%
;
display
:
flex
!
important
;
flex
-
direction
:
column
!
important
;
/deep/
.
el
-
dialog__body
{
height
:
90
%
;
}
}
<
/style
>
<
/style
>
src/pages/Groupmeal/Marketing/index.vue
View file @
dc24f027
<
template
>
<
template
>
<layout>
<layout>
<div
class=
"marketing"
>
<div
class=
"marketing"
>
...
@@ -8,18 +7,9 @@
...
@@ -8,18 +7,9 @@
</div>
</div>
<!-- 列表区 -->
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"anlysis"
border
stripe
>
<el-table
class=
"goods_list"
:data=
"anlysis"
border
stripe
>
<el-table-column
<el-table-column
prop=
"title"
align=
"center"
></el-table-column>
prop=
"title"
<el-table-column
prop=
"total"
align=
"center"
></el-table-column>
align=
"center"
<el-table-column
prop=
"explain"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
prop=
"total"
align=
"center"
></el-table-column>
<el-table-column
prop=
"explain"
align=
"center"
></el-table-column>
</el-table>
</el-table>
</div>
</div>
<div
class=
"marketing"
>
<div
class=
"marketing"
>
...
@@ -29,70 +19,48 @@
...
@@ -29,70 +19,48 @@
</div>
</div>
<!-- 列表区 -->
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"activityList"
border
stripe
>
<el-table
class=
"goods_list"
:data=
"activityList"
border
stripe
>
<el-table-column
<el-table-column
label=
"活动名称"
prop=
"marketing_name"
align=
"center"
></el-table-column>
label=
"活动名称"
<el-table-column
label=
"预算"
prop=
"capital_pool.capital_pool_total"
align=
"center"
></el-table-column>
prop=
"marketing_name"
<el-table-column
label=
"已消耗"
prop=
"capital_pool.capital_pool_used"
align=
"center"
></el-table-column>
align=
"center"
<el-table-column
label=
"已占用"
prop=
"capital_pool.capital_pool_lock"
align=
"center"
></el-table-column>
></el-table-column>
<el-table-column
label=
"状态"
prop=
"online_status_desc"
align=
"center"
></el-table-column>
<el-table-column
label=
"预算"
prop=
"capital_pool.capital_pool_total"
align=
"center"
></el-table-column>
<el-table-column
label=
"已消耗"
prop=
"capital_pool.capital_pool_used"
align=
"center"
></el-table-column>
<el-table-column
label=
"已占用"
prop=
"capital_pool.capital_pool_lock"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"online_status_desc"
align=
"center"
></el-table-column>
<!-- 操作快捷键 -->
<!-- 操作快捷键 -->
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-button
@
click
.
stop=
"handleAddAmount(scope.row)"
type=
"text"
>
充值
</el-button>
<el-button
@
click
.
stop=
"handleAddAmount(scope.row)"
type=
"text"
>
充值
</el-button>
<!--
<el-button>
预算分配
</el-button>
-->
<!--
<el-button>
预算分配
</el-button>
-->
<el-button
type=
"text"
@
click=
"handleActivityOnline(scope.row)"
>
{{
scope
.
row
.
online_status
==
1
?
'活动下线'
:
'活动上线'
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleActivityOnline(scope.row)"
>
{{
scope
.
row
.
online_status
==
1
?
"活动下线"
:
"活动上线"
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleConfig(scope.row)"
>
活动配置
</el-button>
<el-button
type=
"text"
@
click=
"handleConfig(scope.row)"
>
活动配置
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<el-dialog
<el-dialog
title=
"活动配置-团长分销"
v-model=
"showConfigDialog"
width=
"50%"
top=
"2%"
center
>
title=
"活动配置-团长分销"
v-model=
"showConfigDialog"
width=
"50%"
top=
"2%"
center
>
<el-form
:model=
"configForm"
:rules=
"rules"
>
<el-form
:model=
"configForm"
:rules=
"rules"
>
<el-form-item
label=
"设置时间:"
>
<el-form-item
label=
"设置时间:"
>
<el-date-picker
<el-date-picker
v-model=
"configForm.date"
type=
"datetime"
@
change=
"timeChange"
placeholder=
"请设置时间"
></el-date-picker>
v-model=
"configForm.date"
type=
"datetime"
@
change=
"expirDateChange"
placeholder=
"请设置时间"
>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
class=
"config"
class=
"config"
v-for=
"(config, index) in configForm.result"
v-for=
"(config, index) in configForm.result"
:key=
"config.key"
:key=
"config.key"
:rules=
"{
:rules=
"{
required: true, message: '不能为空', trigger: 'blur'
required: true,
message: '不能为空',
trigger: 'blur',
}"
}"
>
>
<h4>
档位{{index + 1}}
</h4>
<h4>
档位{{ index + 1 }}
</h4>
<div
class=
"form-item"
><span>
设置考核单量:
</span><el-input
size=
"mini"
v-model=
"config.assess_order_num"
></el-input></div>
<div
class=
"form-item"
>
<div
class=
"form-item"
><span>
设置奖励金额:
</span><el-input
size=
"mini"
v-model=
"config.reward_amount"
></el-input><el-icon
class=
"el-icon-delete"
@
click
.
prevent=
"removeDomain(config)"
><delete
/></el-icon></div>
<span>
设置考核单量:
</span>
<el-input
size=
"mini"
v-model=
"config.assess_order_num"
></el-input>
</div>
<div
class=
"form-item"
>
<span>
设置奖励金额:
</span>
<el-input
size=
"mini"
v-model=
"config.reward_amount"
></el-input>
<el-icon
class=
"el-icon-delete"
@
click
.
prevent=
"removeDomain(config)"
><delete
/></el-icon>
</div>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
@
click=
"addDomain"
>
新增档位
</el-button>
<el-button
@
click=
"addDomain"
>
新增档位
</el-button>
...
@@ -110,53 +78,61 @@
...
@@ -110,53 +78,61 @@
</template>
</template>
<
script
>
<
script
>
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
import
page
from
"@/components/Pagination"
// import page from "@/components/Pagination";
import
{
import
{
yingxiaoList
,
addAmount
,
toogleYingxiaoOnlineStatus
,
yingxiaoConfig
,
yingxiaoSaveConfig
}
from
"@/service/Goods/goods"
;
yingxiaoList
,
import
moment
from
"moment"
;
addAmount
,
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
toogleYingxiaoOnlineStatus
,
export
default
{
yingxiaoConfig
,
yingxiaoSaveConfig
}
from
"@/service/Goods/goods"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export
default
{
name
:
"MarketingCenter"
,
name
:
"MarketingCenter"
,
components
:
{
components
:
{
Layout
,
Layout
,
page
// page,
},
},
data
()
{
data
()
{
return
{
return
{
rules
:
{
rules
:
{
date
:
[
date
:
[
{
required
:
true
,
message
:
"时间不能为空"
,
trigger
:
"blur"
},
{
{
min
:
0
,
max
:
30
,
message
:
"长度在 0 到 30 个字符"
,
trigger
:
"blur"
}
required
:
true
,
message
:
"时间不能为空"
,
trigger
:
"blur"
,
},
{
min
:
0
,
max
:
30
,
message
:
"长度在 0 到 30 个字符"
,
trigger
:
"blur"
,
},
],
],
},
},
activityList
:
[],
activityList
:
[],
configForm
:
{
configForm
:
{
date
:
''
,
date
:
""
,
result
:
[]
result
:
[],
},
anlysis
:
[
{
title
:
"营销账户预算"
,
explain
:
"运营申请的用户业务增长的营销总预算"
,
total
:
""
,
},
{
title
:
"已消耗(T+1更新)"
,
explain
:
"目前已经确认消耗的营销预算"
,
total
:
""
,
},
{
title
:
"已占用(每10分钟更新)"
,
explain
:
"分享裂变活动中派发出的有效优惠券的总额"
,
total
:
""
,
},
{
title
:
"可用余额"
,
explain
:
"目前平台可使用的余额"
,
total
:
""
,
},
},
anlysis
:
[{
],
title
:
'营销账户预算'
,
explain
:
'运营申请的用户业务增长的营销总预算'
,
total
:
''
},{
title
:
'已消耗(T+1更新)'
,
explain
:
'目前已经确认消耗的营销预算'
,
total
:
''
},{
title
:
'已占用(每10分钟更新)'
,
explain
:
'分享裂变活动中派发出的有效优惠券的总额'
,
total
:
''
},{
title
:
'可用余额'
,
explain
:
'目前平台可使用的余额'
,
total
:
''
}],
anlysisObj
:
{},
anlysisObj
:
{},
params
:
{
params
:
{
page
:
1
,
page
:
1
,
...
@@ -164,14 +140,14 @@ export default {
...
@@ -164,14 +140,14 @@ export default {
},
},
showConfigDialog
:
false
,
showConfigDialog
:
false
,
listParams
:
{
listParams
:
{
marketing_id
:
''
,
marketing_id
:
""
,
date
:
''
,
date
:
""
,
config
:
[]
config
:
[],
}
}
},
},
created
()
{
};
this
.
getMarketingActivityList
()
},
created
()
{
this
.
getMarketingActivityList
();
},
},
methods
:
{
methods
:
{
async
getMarketingActivityList
()
{
async
getMarketingActivityList
()
{
...
@@ -180,68 +156,89 @@ export default {
...
@@ -180,68 +156,89 @@ export default {
this
.
activityList
=
res
.
result
.
list
;
this
.
activityList
=
res
.
result
.
list
;
this
.
anlysisObj
=
res
.
result
.
anlysis
;
this
.
anlysisObj
=
res
.
result
.
anlysis
;
let
list
=
[];
let
list
=
[];
for
(
let
k
in
this
.
anlysisObj
)
{
for
(
let
k
in
this
.
anlysisObj
)
{
list
.
push
(
this
.
anlysisObj
[
k
])
list
.
push
(
this
.
anlysisObj
[
k
]);
}
}
this
.
anlysis
.
map
((
item
,
index
)
=>
item
.
total
=
list
[
index
])
this
.
anlysis
.
map
((
item
,
index
)
=>
(
item
.
total
=
list
[
index
]));
},
},
handleActivityOnline
(
item
)
{
handleActivityOnline
(
item
)
{
this
.
$confirm
(
`您确定要
${
item
.
online_status
==
1
?
'下线'
:
'上线'
}${
item
.
marketing_name
}
吗`
,
`活动
${
item
.
online_status
==
1
?
'下线'
:
'上线'
}
`
,
{
this
.
$confirm
(
confirmButtonText
:
'确定'
,
`您确定要
${
item
.
online_status
==
1
?
"下线"
:
"上线"
}${
item
.
marketing_name
}
吗`
,
cancelButtonText
:
'取消'
,
`活动
${
item
.
online_status
==
1
?
"下线"
:
"上线"
}
`
,
center
:
true
{
}).
then
(
async
()
=>
{
confirmButtonText
:
"确定"
,
let
res
=
await
toogleYingxiaoOnlineStatus
({
marketing_id
:
item
.
marketing_id
,
online_status
:
item
.
online_status
==
1
?
2
:
1
})
//1上线 2下线
cancelButtonText
:
"取消"
,
this
.
getMarketingActivityList
()
center
:
true
,
},
).
then
(
async
()
=>
{
let
res
=
await
toogleYingxiaoOnlineStatus
({
marketing_id
:
item
.
marketing_id
,
online_status
:
item
.
online_status
==
1
?
2
:
1
,
});
//1上线 2下线
this
.
getMarketingActivityList
();
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
else
this
.
$message
.
success
(
'操作成功'
);
else
this
.
$message
.
success
(
"操作成功"
);
})
});
},
},
async
handleAddAmount
(
item
)
{
async
handleAddAmount
(
item
)
{
this
.
$prompt
(
`当前账户预算:
${
this
.
anlysisObj
.
total
}
\n 当前账户可用余额:
${
this
.
anlysisObj
.
balance
}
`
,
'充值'
,
{
this
.
$prompt
(
`当前账户预算:
${
this
.
anlysisObj
.
total
}
\n 当前账户可用余额:
${
this
.
anlysisObj
.
balance
}
`
,
"充值"
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
"取消"
,
inputLabel
:
'输入调整后的账户总预算'
,
inputLabel
:
"输入调整后的账户总预算"
,
inputPattern
:
/
\d{1,5}
/
,
inputPattern
:
/
\d{1,5}
/
,
inputErrorMessage
:
'格式不正确'
inputErrorMessage
:
"格式不正确"
,
}).
then
(
async
({
value
})
=>
{
}).
then
(
async
({
value
})
=>
{
let
res
=
await
addAmount
({
capital_pool_id
:
item
.
capital_pool_id
,
amount
:
value
})
let
res
=
await
addAmount
({
capital_pool_id
:
item
.
capital_pool_id
,
amount
:
value
,
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
else
this
.
$message
.
success
(
'充值成功'
);
else
this
.
$message
.
success
(
"充值成功"
);
})
});
},
},
async
handleConfig
(
item
)
{
async
handleConfig
(
item
)
{
this
.
listParams
.
marketing_id
=
item
.
marketing_id
;
this
.
listParams
.
marketing_id
=
item
.
marketing_id
;
let
res
=
await
yingxiaoConfig
({
date
:
new
Date
()})
let
res
=
await
yingxiaoConfig
({
date
:
moment
(
new
Date
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
else
this
.
$message
.
success
(
"操作成功"
);
this
.
configForm
=
{
result
:
res
.
result
.
list
,
date
:
res
.
result
.
date
,
};
console
.
log
(
"this.configForm"
,
this
.
configForm
);
this
.
showConfigDialog
=
true
;
},
async
timeChange
(
val
)
{
let
res
=
await
yingxiaoConfig
({
date
:
moment
(
val
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
else
this
.
$message
.
success
(
'操作成功'
);
this
.
configForm
=
{
this
.
configForm
=
{
result
:
res
.
result
.
list
,
date
:
res
.
result
.
date
};
result
:
res
.
result
.
list
,
console
.
log
(
'this.configForm'
,
this
.
configForm
)
date
:
res
.
result
.
date
,
this
.
showConfigDialog
=
true
};
},
},
removeDomain
(
item
)
{
removeDomain
(
item
)
{
var
index
=
this
.
configForm
.
result
.
indexOf
(
item
)
var
index
=
this
.
configForm
.
result
.
indexOf
(
item
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
this
.
configForm
.
result
.
splice
(
index
,
1
)
this
.
configForm
.
result
.
splice
(
index
,
1
);
}
}
},
},
addDomain
()
{
addDomain
()
{
this
.
configForm
.
result
.
push
({});
this
.
configForm
.
result
.
push
({});
},
},
async
handleSaveConfig
()
{
async
handleSaveConfig
()
{
this
.
configForm
.
result
.
map
((
item
,
index
)
=>
item
.
level
=
index
+
1
)
this
.
configForm
.
result
.
map
((
item
,
index
)
=>
(
item
.
level
=
index
+
1
));
this
.
listParams
.
config
=
JSON
.
stringify
(
this
.
configForm
.
result
);
this
.
listParams
.
config
=
JSON
.
stringify
(
this
.
configForm
.
result
);
this
.
listParams
.
date
=
this
.
configForm
.
date
;
this
.
listParams
.
date
=
this
.
configForm
.
date
;
let
res
=
await
yingxiaoSaveConfig
(
this
.
listParams
)
let
res
=
await
yingxiaoSaveConfig
(
this
.
listParams
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
else
this
.
$message
.
success
(
'设置成功'
);
else
this
.
$message
.
success
(
"设置成功"
);
this
.
showConfigDialog
=
false
this
.
showConfigDialog
=
false
;
}
},
}
},
}
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.marketing {
.marketing {
padding: 30px;
padding: 30px;
.header {
.header {
display: flex;
display: flex;
...
@@ -271,5 +268,5 @@ export default {
...
@@ -271,5 +268,5 @@ export default {
}
}
}
}
}
}
}
}
</
style
>
</
style
>
src/pages/Groupmeal/headManagement/index.vue
View file @
dc24f027
...
@@ -40,8 +40,8 @@
...
@@ -40,8 +40,8 @@
</span>
</span>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
<el-dialog
title=
"添加自提点"
v-model=
"showAddPointDialog"
width=
"50%"
top=
"2%"
>
<el-dialog
title=
"添加自提点"
v-model=
"showAddPointDialog"
width=
"50%"
top=
"2%"
inline
>
<el-form
:model=
"pointObj"
>
<el-form
:model=
"pointObj"
:rules=
"rules"
>
<el-form-item
label=
"联系人姓名"
>
<el-form-item
label=
"联系人姓名"
>
<el-input
maxlength=
"15"
v-model=
"pointObj.contact_name"
placeholder=
"请输入联系人姓名"
></el-input>
<el-input
maxlength=
"15"
v-model=
"pointObj.contact_name"
placeholder=
"请输入联系人姓名"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -51,8 +51,9 @@
...
@@ -51,8 +51,9 @@
<el-form-item
label=
"自提点名称"
>
<el-form-item
label=
"自提点名称"
>
<el-input
v-model=
"pointObj.take_place_name"
placeholder=
"请输入自提点名称"
></el-input>
<el-input
v-model=
"pointObj.take_place_name"
placeholder=
"请输入自提点名称"
></el-input>
</el-form-item>
</el-form-item>
<div
id=
"js-container"
class=
"myMap"
>
正在加载数据 ...
</div>
<!-- <div id="js-container" class="myMap">正在加载数据 ...</div> -->
<el-form-item
label=
"自提点地址"
>
<my-map
class=
"my-map"
@
getMapInfo=
"getMapInfo"
/>
<el-form-item
label=
"详细地址"
>
<el-input
v-model=
"pointObj.location"
placeholder=
"请输入自提点地址"
></el-input>
<el-input
v-model=
"pointObj.location"
placeholder=
"请输入自提点地址"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"自提点图片"
>
<el-form-item
label=
"自提点图片"
>
...
@@ -112,6 +113,7 @@
...
@@ -112,6 +113,7 @@
</template>
</template>
<
script
>
<
script
>
import
myMap
from
"@/pages/Activity/releaseProduc/components/myMap.vue"
;
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
// import page from "@/components/Pagination";
// import page from "@/components/Pagination";
import
{
ColoneList
,
ColoneApplyList
,
colonelAudit
,
colonelApplyPoint
,
colonelAddApplyPoint
}
from
"@/service/Goods/goods"
;
import
{
ColoneList
,
ColoneApplyList
,
colonelAudit
,
colonelApplyPoint
,
colonelAddApplyPoint
}
from
"@/service/Goods/goods"
;
...
@@ -121,6 +123,7 @@
...
@@ -121,6 +123,7 @@
name
:
"MarketingCenter"
,
name
:
"MarketingCenter"
,
components
:
{
components
:
{
Layout
,
Layout
,
myMap
,
// page,
// page,
},
},
data
()
{
data
()
{
...
@@ -139,6 +142,9 @@
...
@@ -139,6 +142,9 @@
pickStation
:
{},
pickStation
:
{},
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
applyItem
:
{},
applyItem
:
{},
rules
:
{
take_place_name
:
[{
required
:
true
,
message
:
"请输入详细地址"
,
trigger
:
"change"
}],
},
};
};
},
},
async
created
()
{
async
created
()
{
...
@@ -160,7 +166,10 @@
...
@@ -160,7 +166,10 @@
else
return
this
.
$message
.
success
(
"添加成功"
);
else
return
this
.
$message
.
success
(
"添加成功"
);
},
},
async
apply
(
item
,
type
)
{
async
apply
(
item
,
type
)
{
let
res
=
await
colonelAudit
({
colonel_apply_id
:
item
.
colonel_apply_id
,
audit_status
:
type
});
let
res
=
await
colonelAudit
({
colonel_apply_id
:
item
.
colonel_apply_id
,
audit_status
:
type
,
});
await
this
.
getColoneApplyList
();
await
this
.
getColoneApplyList
();
this
.
dialogFormVisible
=
false
;
this
.
dialogFormVisible
=
false
;
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
...
@@ -171,7 +180,6 @@
...
@@ -171,7 +180,6 @@
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
pointObj
=
res
.
result
;
this
.
pointObj
=
res
.
result
;
this
.
pickStation
=
`
${
this
.
pointObj
.
province
}
-
${
this
.
pointObj
.
city
}
-
${
this
.
pointObj
.
area
}
`
;
this
.
pickStation
=
`
${
this
.
pointObj
.
province
}
-
${
this
.
pointObj
.
city
}
-
${
this
.
pointObj
.
area
}
`
;
this
.
initMap
();
this
.
pointObj
.
take_place_pic
&&
(
this
.
fileList
[
0
]
=
this
.
pointObj
.
take_place_pic
);
this
.
pointObj
.
take_place_pic
&&
(
this
.
fileList
[
0
]
=
this
.
pointObj
.
take_place_pic
);
this
.
showAddPointDialog
=
true
;
this
.
showAddPointDialog
=
true
;
},
},
...
@@ -193,109 +201,15 @@
...
@@ -193,109 +201,15 @@
console
.
error
(
error
);
console
.
error
(
error
);
}
}
},
},
// getMapInfo(mapInfo) {
getMapInfo
(
mapInfo
)
{
// this.form.location = mapInfo.address;
console
.
log
(
"mapInfo"
,
mapInfo
);
// this.form.province = mapInfo.province;
this
.
pointObj
.
address
=
mapInfo
.
address
;
// this.form.city = mapInfo.city;
this
.
pointObj
.
location
=
mapInfo
.
location
;
// this.form.area = mapInfo.area;
this
.
pointObj
.
province
=
mapInfo
.
province
;
// this.form.longitude = mapInfo.lng; // longitude latitude contactor
this
.
pointObj
.
city
=
mapInfo
.
city
;
// this.form.latitude = mapInfo.lat;
this
.
pointObj
.
area
=
mapInfo
.
area
;
// },
this
.
pointObj
.
longitude
=
mapInfo
.
lng
;
// longitude latitude contactor
dragMap
(
data
)
{
this
.
pointObj
.
latitude
=
mapInfo
.
lat
;
console
.
log
(
data
);
this
.
pointObj
.
location
=
data
.
address
;
this
.
pointObj
.
longitude
=
data
.
position
.
lng
;
this
.
pointObj
.
latitude
=
data
.
position
.
lat
;
this
.
pointObj
.
province
=
data
.
regeocode
.
addressComponent
.
province
;
this
.
pointObj
.
city
=
data
.
regeocode
.
addressComponent
.
city
;
this
.
pointObj
.
province
=
data
.
regeocode
.
addressComponent
.
district
;
},
initMap
()
{
// 加载PositionPicker,loadUI的路径参数为模块名中 'ui/' 之后的部分
let
AMapUI
=
(
this
.
AMapUI
=
window
.
AMapUI
);
let
AMap
=
(
this
.
AMap
=
window
.
AMap
);
AMapUI
.
loadUI
([
"misc/PositionPicker"
],
(
PositionPicker
)
=>
{
let
mapConfig
=
{
zoom
:
16
,
// cityName: this.MapCityName
};
if
(
this
.
coloneApplyList
.
latitude
&&
this
.
coloneApplyList
.
longitude
)
{
mapConfig
.
center
=
[
this
.
coloneApplyList
.
longitude
,
this
.
coloneApplyList
.
latitude
];
}
let
map
=
new
AMap
.
Map
(
"js-container"
,
mapConfig
);
// 加载地图搜索插件
AMap
.
service
(
"AMap.PlaceSearch"
,
()
=>
{
this
.
placeSearch
=
new
AMap
.
PlaceSearch
({
pageSize
:
5
,
pageIndex
:
1
,
citylimit
:
true
,
// city: this.MapCityName,
map
:
map
,
panel
:
"js-result"
,
});
});
// 启用工具条
AMap
.
plugin
([
"AMap.ToolBar"
],
function
()
{
map
.
addControl
(
new
AMap
.
ToolBar
({
position
:
"RB"
,
}),
);
});
// 地图地图定位
AMap
.
plugin
(
"AMap.Geolocation"
,
function
()
{
var
geolocation
=
new
AMap
.
Geolocation
({
// 是否使用高精度定位,默认:true
enableHighAccuracy
:
true
,
// 设置定位超时时间,默认:无穷大
timeout
:
10000
,
// 定位按钮的停靠位置的偏移量,默认:Pixel(10, 20)
buttonOffset
:
new
AMap
.
Pixel
(
10
,
20
),
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
zoomToAccuracy
:
true
,
// 定位按钮的排放位置, RB表示右下
buttonPosition
:
"RB"
,
});
map
.
addControl
(
geolocation
);
geolocation
.
getCurrentPosition
();
AMap
.
event
.
addListener
(
geolocation
,
"complete"
,
onComplete
);
AMap
.
event
.
addListener
(
geolocation
,
"error"
,
onError
);
function
onComplete
(
data
)
{
console
.
log
(
data
);
// data是具体的定位信息
}
function
onError
(
data
)
{
console
.
log
(
data
);
// 定位出错
}
});
// 创建地图拖拽
let
positionPicker
=
new
PositionPicker
({
mode
:
"dragMap"
,
// 设定为拖拽地图模式,可选'dragMap'、'dragMarker',默认为'dragMap'
map
:
map
,
// 依赖地图对象
iconStyle
:
{
//自定义外观
url
:
"//webapi.amap.com/ui/1.0/assets/position-picker2.png"
,
//图片地址
size
:
[
50
,
50
],
//要显示的点大小,将缩放图片
ancher
:
[
24
,
40
],
//锚点的位置,即被size缩放之后,图片的什么位置作为选中的位置
},
});
// 拖拽完成发送自定义 drag 事件
positionPicker
.
on
(
"success"
,
(
positionResult
)
=>
{
this
.
dragMap
(
positionResult
);
console
.
log
(
"positionResult"
,
positionResult
);
});
// 启动拖放
// positionPicker.start();
});
},
},
},
},
};
};
...
...
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