Commit 49897c51 authored by liwenhong's avatar liwenhong

add

parent bbcf523a
...@@ -208,3 +208,31 @@ exports.coloneApplyList = async ctx => { ...@@ -208,3 +208,31 @@ exports.coloneApplyList = async ctx => {
const res = await req(ctx, opts); const res = await req(ctx, opts);
ctx.body = res; 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) ...@@ -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}/update_marketing_list`, goods.updateMarketingList)
router.post(`${API_VERSION}/coloneList`, goods.coloneList) router.post(`${API_VERSION}/coloneList`, goods.coloneList)
router.post(`${API_VERSION}/coloneApplyList`, goods.coloneApplyList) 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 @@ ...@@ -40,24 +40,69 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200"> <el-table-column label="操作" align="center" fixed="right" width="200">
<!-- <el-button type="primary" size="small">审核</el-button> --> <!-- <el-button type="primary" size="small">审核</el-button> -->
<el-popconfirm <template #default="scope">
title='您确认通过(${contact_name})的团长申请吗' <el-popconfirm
@confirm="handleApply" :title="applyPopTitle"
> @confirm="handleApply(scope.row.colonel_apply_id, scope.row.audit_status)"
<template #reference> >
<el-button <template #reference>
type="primary" <el-button type="primary" size="mini" @click="apply(scope.row.contact_name)">审核</el-button>
size="mini" </template>
>审核</el-button </el-popconfirm>
> <el-button type="success" size="small">通过</el-button>
</template> <el-button type="primary" size="small" @click="addPoint(scope.row.colonel_apply_id)">添加自提点</el-button>
</el-popconfirm> <el-button type="danger" size="small">拒绝</el-button>
<el-button type="success" size="small">通过</el-button> </template>
<el-button type="primary" size="small">添加自提点</el-button>
<el-button type="danger" size="small">拒绝</el-button>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </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="marketing">
<!-- 表头 --> <!-- 表头 -->
<div class="header"> <div class="header">
...@@ -106,6 +151,8 @@ import page from "@/components/Pagination" ...@@ -106,6 +151,8 @@ import page from "@/components/Pagination"
import { import {
ColoneList, ColoneList,
ColoneApplyList, ColoneApplyList,
colonelAudit,
colonelApplyPoint
} from "@/service/Goods/goods"; } from "@/service/Goods/goods";
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no"; // import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export default { export default {
...@@ -122,6 +169,9 @@ export default { ...@@ -122,6 +169,9 @@ export default {
page: 1, page: 1,
page_size: 20 page_size: 20
}, },
applyPopTitle: '',
pointObj: {},
showAddPointDialog: false
} }
}, },
...@@ -130,25 +180,38 @@ export default { ...@@ -130,25 +180,38 @@ export default {
this.getColoneApplyList() this.getColoneApplyList()
}, },
methods: { methods: {
comLibrarySave() {},
async getColoneList() { apply(name) {
try { this.applyPopTitle = `您确认通过(${name})的团长申请吗`
const res = await ColoneList(this.params); },
if (res.code !== 0) return this.$message.error(res.reason); async addPoint(id) {
this.coloneList = res.result; let res = await colonelApplyPoint({colonel_apply_id: id});
} catch (error) { if (res.code !== 0) return this.$message.error(res.reason);
console.error(error); this.pointObj = res.result;
} this.showAddPointDialog = true
}, },
async getColoneApplyList() { async handleApply(id, status) {
try { let res = await colonelAudit({colonel_apply_id: id, audit_status: status})
const res = await ColoneApplyList(this.params); if (res.code !== 0) return this.$message.error(res.reason);
if (res.code !== 0) return this.$message.error(res.reason); },
this.coloneApplyList = res.result; async getColoneList() {
} catch (error) { try {
console.error(error); 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> </script>
......
...@@ -107,3 +107,15 @@ export async function ColoneApplyList (params) { ...@@ -107,3 +107,15 @@ export async function ColoneApplyList (params) {
return res; 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