Commit bb53b600 authored by liwenhong's avatar liwenhong

add: 团长分销

parent fecfd774
...@@ -235,4 +235,28 @@ exports.colonelApplyPoint = async ctx => { ...@@ -235,4 +235,28 @@ exports.colonelApplyPoint = async ctx => {
ctx.body = res; 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) ...@@ -66,6 +66,9 @@ 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}/colonelAudit`, goods.colonelAudit)
router.post(`${API_VERSION}/colonelApplyPoint`, goods.colonelApplyPoint) 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 ...@@ -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}/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_conf`, groupmeal.getList)
router.post(`${API_VERSION}/order/deliverer/list_day_deliverer`, groupmeal.getDelivererList) router.post(`${API_VERSION}/order/deliverer/list_day_deliverer`, groupmeal.getDelivererList)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
> >
</div> </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 <el-table-column
label="商品id" label="商品id"
prop="goods_spu_id" prop="goods_spu_id"
...@@ -34,25 +34,30 @@ ...@@ -34,25 +34,30 @@
<h2>活动列表</h2> <h2>活动列表</h2>
</div> </div>
<!-- 列表区 --> <!-- 列表区 -->
<el-table class="goods_list" :data="goodsList" border stripe> <el-table class="goods_list" :data="activityList" border stripe>
<el-table-column <el-table-column
label="活动名称" 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" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="已消耗" label="已消耗"
prop="goods_name" prop="capital_pool.capital_pool_used"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="已占用" label="已占用"
prop="category_1_name" prop="capital_pool.capital_pool_lock"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="category_2_name" prop="online_status_desc"
align="center" align="center"
></el-table-column> ></el-table-column>
<!-- 操作快捷键 --> <!-- 操作快捷键 -->
...@@ -80,8 +85,9 @@ ...@@ -80,8 +85,9 @@
import Layout from "../../Groupmeal/layout/index.vue"; import Layout from "../../Groupmeal/layout/index.vue";
import page from "@/components/Pagination" import page from "@/components/Pagination"
import { import {
getList, yingxiaoList,
} 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 {
name: "MarketingCenter", name: "MarketingCenter",
...@@ -91,7 +97,7 @@ export default { ...@@ -91,7 +97,7 @@ export default {
}, },
data () { data () {
return { return {
goodsList: [], activityList: [],
params: { params: {
page: 1, page: 1,
page_size: 20 page_size: 20
...@@ -100,14 +106,14 @@ export default { ...@@ -100,14 +106,14 @@ export default {
} }
}, },
created () { created () {
this.getCommodityList() this.getMarketingActivityList()
}, },
methods: { methods: {
async getCommodityList() { async getMarketingActivityList() {
try { try {
const res = await getList(); const res = await yingxiaoList();
if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
this.goodsList = res.result.list; this.activityList = res.result.list;
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }
......
...@@ -49,9 +49,10 @@ ...@@ -49,9 +49,10 @@
<el-button type="primary" size="mini" @click="apply(scope.row.contact_name)">审核</el-button> <el-button type="primary" size="mini" @click="apply(scope.row.contact_name)">审核</el-button>
</template> </template>
</el-popconfirm> </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="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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -89,16 +90,35 @@ ...@@ -89,16 +90,35 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="自提点图片"> <el-form-item label="自提点图片">
<el-image <!-- <el-image
class="activityImage" class="activityImage"
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
fit="cover" 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-item>
</el-form> </el-form>
<template #footer> <template #footer>
<span class="dialog-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> <el-button type="primary" @click="comLibrarySave">保存</el-button>
</span> </span>
</template> </template>
...@@ -152,9 +172,11 @@ import { ...@@ -152,9 +172,11 @@ import {
ColoneList, ColoneList,
ColoneApplyList, ColoneApplyList,
colonelAudit, colonelAudit,
colonelApplyPoint colonelApplyPoint,
colonelAddApplyPoint
} from "@/service/Goods/goods"; } from "@/service/Goods/goods";
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no"; // import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
import { GOODS_URI } from "/server/config";
export default { export default {
name: "MarketingCenter", name: "MarketingCenter",
components: { components: {
...@@ -171,16 +193,27 @@ export default { ...@@ -171,16 +193,27 @@ export default {
}, },
applyPopTitle: '', applyPopTitle: '',
pointObj: {}, pointObj: {},
showAddPointDialog: false showAddPointDialog: false,
fileList: [],
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
} }
}, },
async created () { async created () {
await this.getColoneList() await this.getColoneList()
this.getColoneApplyList() await this.getColoneApplyList();
this.fileList[0] = pointObj.take_place_pic
}, },
methods: { 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) { apply(name) {
this.applyPopTitle = `您确认通过(${name})的团长申请吗` this.applyPopTitle = `您确认通过(${name})的团长申请吗`
}, },
......
...@@ -119,3 +119,15 @@ export async function colonelApplyPoint (params) { ...@@ -119,3 +119,15 @@ export async function colonelApplyPoint (params) {
return res; 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