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
bb53b600
Commit
bb53b600
authored
Aug 27, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 团长分销
parent
fecfd774
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
21 deletions
+100
-21
goods.js
server/controllers/goods.js
+24
-0
router.js
server/router.js
+4
-0
index.vue
src/pages/Groupmeal/Marketing/index.vue
+18
-12
index.vue
src/pages/Groupmeal/headManagement/index.vue
+42
-9
goods.js
src/service/Goods/goods.js
+12
-0
No files found.
server/controllers/goods.js
View file @
bb53b600
...
...
@@ -235,4 +235,28 @@ exports.colonelApplyPoint = async ctx => {
ctx
.
body
=
res
;
};
//团长添加自提点
exports
.
colonelAddApplyPoint
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/colonel_add_apply_point`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
exports
.
yingxiaoList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/yingxiao_list`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
\ No newline at end of file
server/router.js
View file @
bb53b600
...
...
@@ -66,6 +66,9 @@ router.post(`${API_VERSION}/coloneList`, goods.coloneList)
router
.
post
(
`
${
API_VERSION
}
/coloneApplyList`
,
goods
.
coloneApplyList
)
router
.
post
(
`
${
API_VERSION
}
/colonelAudit`
,
goods
.
colonelAudit
)
router
.
post
(
`
${
API_VERSION
}
/colonelApplyPoint`
,
goods
.
colonelApplyPoint
)
router
.
post
(
`
${
API_VERSION
}
/colonelAddApplyPoint`
,
goods
.
colonelAddApplyPoint
)
router
.
post
(
`
${
API_VERSION
}
/yingxiaoList`
,
goods
.
yingxiaoList
);
...
...
@@ -96,6 +99,7 @@ router.post(`${API_VERSION}/marketing/background/marketing_info`, activity.marke
router
.
post
(
`
${
API_VERSION
}
/marketing/background/update_marketing`
,
activity
.
updateMarketing
);
// 团餐运营--配送
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/list_day_deliverer_conf`
,
groupmeal
.
getList
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/list_day_deliverer`
,
groupmeal
.
getDelivererList
)
...
...
src/pages/Groupmeal/Marketing/index.vue
View file @
bb53b600
...
...
@@ -10,7 +10,7 @@
>
</div>
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"
goodsList"
border
stripe
>
<el-table
class=
"goods_list"
:data=
"
activityList"
border
stripe
:tab-position=
"left"
>
<el-table-column
label=
"商品id"
prop=
"goods_spu_id"
...
...
@@ -34,25 +34,30 @@
<h2>
活动列表
</h2>
</div>
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"
goods
List"
border
stripe
>
<el-table
class=
"goods_list"
:data=
"
activity
List"
border
stripe
>
<el-table-column
label=
"活动名称"
prop=
"goods_spu_id"
prop=
"marketing_name"
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=
"
goods_name
"
prop=
"
capital_pool.capital_pool_used
"
align=
"center"
></el-table-column>
<el-table-column
label=
"已占用"
prop=
"ca
tegory_1_name
"
prop=
"ca
pital_pool.capital_pool_lock
"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"
category_2_name
"
prop=
"
online_status_desc
"
align=
"center"
></el-table-column>
<!-- 操作快捷键 -->
...
...
@@ -80,8 +85,9 @@
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
import
page
from
"@/components/Pagination"
import
{
get
List
,
yingxiao
List
,
}
from
"@/service/Goods/goods"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export
default
{
name
:
"MarketingCenter"
,
...
...
@@ -91,7 +97,7 @@ export default {
},
data
()
{
return
{
goods
List
:
[],
activity
List
:
[],
params
:
{
page
:
1
,
page_size
:
20
...
...
@@ -100,14 +106,14 @@ export default {
}
},
created
()
{
this
.
get
Commod
ityList
()
this
.
get
MarketingActiv
ityList
()
},
methods
:
{
async
get
Commod
ityList
()
{
async
get
MarketingActiv
ityList
()
{
try
{
const
res
=
await
get
List
();
const
res
=
await
yingxiao
List
();
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
goods
List
=
res
.
result
.
list
;
this
.
activity
List
=
res
.
result
.
list
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
...
...
src/pages/Groupmeal/headManagement/index.vue
View file @
bb53b600
...
...
@@ -49,9 +49,10 @@
<el-button
type=
"primary"
size=
"mini"
@
click=
"apply(scope.row.contact_name)"
>
审核
</el-button>
</
template
>
</el-popconfirm>
<el-button
type=
"
success
"
size=
"small"
>
通过
</el-button>
<el-button
type=
"
text
"
size=
"small"
>
通过
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"addPoint(scope.row.colonel_apply_id)"
>
添加自提点
</el-button>
<el-button
type=
"danger"
size=
"small"
>
拒绝
</el-button>
<!-- v-if="scope.row.take_place_status==1" -->
<el-button
type=
"text"
size=
"small"
>
拒绝
</el-button>
</template>
</el-table-column>
</el-table>
...
...
@@ -89,16 +90,35 @@
></el-input>
</el-form-item>
<el-form-item
label=
"自提点图片"
>
<el-image
<
!-- <
el-image
class="activityImage"
style="width: 100px; height: 100px"
fit="cover"
></el-image>
></el-image> -->
<el-upload
:class=
"{ hide: hideUpload }"
:data=
"{ type: 1 }"
:action=
"uploadUrl"
:on-preview=
"previewImage"
:on-success=
"handleDetailSuccess"
:on-change=
"handleDetailChange"
:before-remove=
"removeDetailFiles"
:file-list=
"fileList"
auto-upload
ref=
"picUpload"
limit=
"1"
list-type=
"picture-card"
multiple
>
<
template
#
default
>
<i
class=
"el-icon-plus"
></i>
</
template
>
</el-upload>
</el-form-item>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"s
elCommodityPopup
= false"
>
取 消
</el-button>
<el-button
@
click=
"s
howAddPointDialog
= false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"comLibrarySave"
>
保存
</el-button>
</span>
</
template
>
...
...
@@ -152,9 +172,11 @@ import {
ColoneList
,
ColoneApplyList
,
colonelAudit
,
colonelApplyPoint
colonelApplyPoint
,
colonelAddApplyPoint
}
from
"@/service/Goods/goods"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
import
{
GOODS_URI
}
from
"/server/config"
;
export
default
{
name
:
"MarketingCenter"
,
components
:
{
...
...
@@ -171,16 +193,27 @@ export default {
},
applyPopTitle
:
''
,
pointObj
:
{},
showAddPointDialog
:
false
showAddPointDialog
:
false
,
fileList
:
[],
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
,
// 金山云上传地址
}
},
async
created
()
{
await
this
.
getColoneList
()
this
.
getColoneApplyList
()
await
this
.
getColoneApplyList
();
this
.
fileList
[
0
]
=
pointObj
.
take_place_pic
},
methods
:
{
comLibrarySave
()
{},
handleDetailSuccess
(
res
)
{
this
.
pointObj
.
take_place_pic
=
res
.
result
.
url
;
},
async
comLibrarySave
()
{
let
res
=
await
colonelAddApplyPoint
(
this
.
pointObj
);
this
.
showAddPointDialog
=
false
;
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
else
return
this
.
$message
.
success
(
'添加成功'
)
},
apply
(
name
)
{
this
.
applyPopTitle
=
`您确认通过(
${
name
}
)的团长申请吗`
},
...
...
src/service/Goods/goods.js
View file @
bb53b600
...
...
@@ -119,3 +119,15 @@ export async function colonelApplyPoint (params) {
return
res
;
}
// 团长添加自提点
export
async
function
colonelAddApplyPoint
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/colonelAddApplyPoint"
,
params
);
return
res
;
}
// 营销中心-活动列表
export
async
function
yingxiaoList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/yingxiaoList"
,
params
);
return
res
;
}
\ No newline at end of file
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