Commit 49897c51 authored by liwenhong's avatar liwenhong

add

parent bbcf523a
......@@ -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;
};
......@@ -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)
//生活号
......
......@@ -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> -->
<template #default="scope">
<el-popconfirm
title='您确认通过(${contact_name})的团长申请吗'
@confirm="handleApply"
:title="applyPopTitle"
@confirm="handleApply(scope.row.colonel_apply_id, scope.row.audit_status)"
>
<template #reference>
<el-button
type="primary"
size="mini"
>审核</el-button
>
<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">添加自提点</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,7 +180,20 @@ export default {
this.getColoneApplyList()
},
methods: {
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);
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment