Commit bb53b600 authored by liwenhong's avatar liwenhong

add: 团长分销

parent fecfd774
......@@ -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
......@@ -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)
......
......@@ -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="goodsList" border stripe>
<el-table class="goods_list" :data="activityList" 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="category_1_name"
prop="capital_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 {
getList,
yingxiaoList,
} from "@/service/Goods/goods";
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export default {
name: "MarketingCenter",
......@@ -91,7 +97,7 @@ export default {
},
data () {
return {
goodsList: [],
activityList: [],
params: {
page: 1,
page_size: 20
......@@ -100,14 +106,14 @@ export default {
}
},
created () {
this.getCommodityList()
this.getMarketingActivityList()
},
methods: {
async getCommodityList() {
async getMarketingActivityList() {
try {
const res = await getList();
const res = await yingxiaoList();
if (res.code !== 0) return this.$message.error(res.reason);
this.goodsList = res.result.list;
this.activityList = res.result.list;
} catch (error) {
console.error(error);
}
......
......@@ -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="selCommodityPopup = false">取 消</el-button>
<el-button @click="showAddPointDialog = 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})的团长申请吗`
},
......
......@@ -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
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