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
49897c51
Commit
49897c51
authored
Aug 26, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
bbcf523a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
142 additions
and
34 deletions
+142
-34
goods.js
server/controllers/goods.js
+28
-0
router.js
server/router.js
+5
-0
index.vue
src/pages/Groupmeal/headManagement/index.vue
+97
-34
goods.js
src/service/Goods/goods.js
+12
-0
No files found.
server/controllers/goods.js
View file @
49897c51
...
...
@@ -208,3 +208,31 @@ exports.coloneApplyList = async ctx => {
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
//团长申请操作
exports
.
colonelAudit
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/colonel_audit`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
//团长获取自提点信息
exports
.
colonelApplyPoint
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/colonel_show_apply_point`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
server/router.js
View file @
49897c51
...
...
@@ -64,6 +64,11 @@ router.post(`${API_VERSION}/get_marketing_info`, goods.getMarketingInfo)
router
.
post
(
`
${
API_VERSION
}
/update_marketing_list`
,
goods
.
updateMarketingList
)
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
)
//生活号
...
...
src/pages/Groupmeal/headManagement/index.vue
View file @
49897c51
...
...
@@ -40,24 +40,69 @@
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<!-- <el-button type="primary" size="small">审核</el-button> -->
<el-popconfirm
title=
'您确认通过(${contact_name})的团长申请吗'
@
confirm=
"handleApply"
>
<
template
#
reference
>
<el-button
type=
"primary"
size=
"mini"
>
审核
</el-button
>
</
template
>
</el-popconfirm>
<el-button
type=
"success"
size=
"small"
>
通过
</el-button>
<el-button
type=
"primary"
size=
"small"
>
添加自提点
</el-button>
<el-button
type=
"danger"
size=
"small"
>
拒绝
</el-button>
<
template
#
default=
"scope"
>
<el-popconfirm
:title=
"applyPopTitle"
@
confirm=
"handleApply(scope.row.colonel_apply_id, scope.row.audit_status)"
>
<template
#
reference
>
<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=
"primary"
size=
"small"
@
click=
"addPoint(scope.row.colonel_apply_id)"
>
添加自提点
</el-button>
<el-button
type=
"danger"
size=
"small"
>
拒绝
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog
title=
"添加自提点"
v-model=
"showAddPointDialog"
width=
"50%"
top=
"2%"
>
<el-form
:model=
"pointObj"
>
<el-form-item
label=
"联系人姓名"
>
<el-input
maxlength=
"15"
v-model=
"pointObj.contact_name"
placeholder=
"请输入联系人姓名"
></el-input>
</el-form-item>
<el-form-item
label=
"联系人电话"
>
<el-input
v-model=
"pointObj.phone"
placeholder=
"请输入联系人电话"
></el-input>
</el-form-item>
<el-form-item
label=
"自提点名称"
>
<el-input
v-model=
"pointObj.phone"
placeholder=
"请输入自提点名称"
></el-input>
</el-form-item>
<el-form-item
label=
"自提点地址"
>
<el-input
v-model=
"pointObj.phone"
placeholder=
"请输入自提点地址"
></el-input>
</el-form-item>
<el-form-item
label=
"自提点图片"
>
<el-image
class=
"activityImage"
style=
"width: 100px; height: 100px"
fit=
"cover"
></el-image>
</el-form-item>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"selCommodityPopup = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"comLibrarySave"
>
保存
</el-button>
</span>
</
template
>
</el-dialog>
<div
class=
"marketing"
>
<!-- 表头 -->
<div
class=
"header"
>
...
...
@@ -106,6 +151,8 @@ import page from "@/components/Pagination"
import
{
ColoneList
,
ColoneApplyList
,
colonelAudit
,
colonelApplyPoint
}
from
"@/service/Goods/goods"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export
default
{
...
...
@@ -122,6 +169,9 @@ export default {
page
:
1
,
page_size
:
20
},
applyPopTitle
:
''
,
pointObj
:
{},
showAddPointDialog
:
false
}
},
...
...
@@ -130,25 +180,38 @@ export default {
this
.
getColoneApplyList
()
},
methods
:
{
async
getColoneList
()
{
try
{
const
res
=
await
ColoneList
(
this
.
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
coloneList
=
res
.
result
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
async
getColoneApplyList
()
{
try
{
const
res
=
await
ColoneApplyList
(
this
.
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
coloneApplyList
=
res
.
result
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
comLibrarySave
()
{},
apply
(
name
)
{
this
.
applyPopTitle
=
`您确认通过(
${
name
}
)的团长申请吗`
},
async
addPoint
(
id
)
{
let
res
=
await
colonelApplyPoint
({
colonel_apply_id
:
id
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
pointObj
=
res
.
result
;
this
.
showAddPointDialog
=
true
},
async
handleApply
(
id
,
status
)
{
let
res
=
await
colonelAudit
({
colonel_apply_id
:
id
,
audit_status
:
status
})
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
},
async
getColoneList
()
{
try
{
const
res
=
await
ColoneList
(
this
.
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
coloneList
=
res
.
result
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
async
getColoneApplyList
()
{
try
{
const
res
=
await
ColoneApplyList
(
this
.
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
coloneApplyList
=
res
.
result
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
}
}
</
script
>
...
...
src/service/Goods/goods.js
View file @
49897c51
...
...
@@ -107,3 +107,15 @@ export async function ColoneApplyList (params) {
return
res
;
}
// 团长申请操作
export
async
function
colonelAudit
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/colonelAudit"
,
params
);
return
res
;
}
// 团长自提点信息
export
async
function
colonelApplyPoint
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/colonelApplyPoint"
,
params
);
return
res
;
}
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