Commit 317d5159 authored by liwenhong's avatar liwenhong

Merge branch 'master' into feature/add-commissionMode

# Conflicts:
#	server/config.js
#	server/router.js
#	src/pages/Goods/Detail/index.vue
#	src/pages/Goods/Retail/index.vue
#	src/router/index.js
parents d958a0c0 bf445651
......@@ -115,7 +115,7 @@ exports.marketingInfo = async ctx => {
// 关闭/开启 活动
exports.updateActivity = async ctx => {
const url = `${ACTIVITY_URI}/marketing/background/update_marketing`;
const url = `${ACTIVITY_URI}/marketing/background/update_marketing_online_status`;
const opts = {
url,
method: "POST",
......
const GROUPMEAL_URI = require("../config.js").GROUPMEAL_URI;
const req = require("../utils/request").httpReq;
// 获取订单管理列表
exports.getOrderList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取主页配送列表
exports.getList = async ctx => {
const opts = {
......@@ -51,9 +41,22 @@ exports.getSaveDeliverer = async ctx => {
};
ctx.body = await req(ctx, opts);
};
// 老订单管理
// 获取订单管理列表
exports.getOrderList = async ctx => {
const url = `${GROUPMEAL_URI}/order/oldbackground/order_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取活动名称
exports.getMarketingList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/marketing_list`;
const url = `${GROUPMEAL_URI}/order/oldbackground/marketing_list`;
const opts = {
url,
method: "GET"
......@@ -63,7 +66,7 @@ exports.getMarketingList = async ctx => {
// 获取商品名称
exports.getGoodsList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/goods_list`;
const url = `${GROUPMEAL_URI}/order/oldbackground/goods_list`;
const opts = {
url,
method: "GET"
......@@ -73,7 +76,7 @@ exports.getGoodsList = async ctx => {
// 获取自提点
exports.getSubShopList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/sub_shop_list`;
const url = `${GROUPMEAL_URI}/order/oldbackground/sub_shop_list`;
const opts = {
url,
method: "GET"
......@@ -83,7 +86,7 @@ exports.getSubShopList = async ctx => {
// 导出订单
exports.orderExport = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_export`;
const url = `${GROUPMEAL_URI}/order/oldbackground/order_export`;
const opts = {
url,
method: "GET"
......@@ -93,7 +96,7 @@ exports.orderExport = async ctx => {
// 打印订单
exports.orderPrint = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_print`;
const url = `${GROUPMEAL_URI}/order/oldbackground/order_print`;
const opts = {
url,
method: "GET"
......@@ -103,7 +106,7 @@ exports.orderPrint = async ctx => {
// 订单退款列表
exports.orderItemList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_item_list`;
const url = `${GROUPMEAL_URI}/order/oldbackground/order_item_list`;
const opts = {
url,
method: "GET"
......@@ -113,7 +116,7 @@ exports.orderItemList = async ctx => {
// 订单退款列表
exports.orderRefund = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_refund`;
const url = `${GROUPMEAL_URI}/order/oldbackground/order_refund`;
const opts = {
url,
method: "POST",
......@@ -125,6 +128,100 @@ exports.orderRefund = async ctx => {
// 订单驳回
exports.orderRefundReject = async ctx => {
const url = `${GROUPMEAL_URI}/order/oldbackground/order_refund_reject`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 新订单管理
// 获取订单管理列表
exports.newGetOrderList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取活动名称
exports.newGetMarketingList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_condition_marketing_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取商品名称
exports.newGetGoodsList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_condition_goods_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取自提点
exports.newGetSubShopList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_condition_take_place_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 导出订单
exports.newOrderExport = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_export`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 打印订单
exports.newOrderPrint = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_print`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 订单退款列表
exports.newOrderItemList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_item_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 订单退款列表
exports.newOrderRefund = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_refund`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 订单驳回
exports.newOrderRefundReject = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/order_refund_reject`;
const opts = {
url,
......
......@@ -71,6 +71,50 @@ exports.getApplyDetail = async ctx => {
ctx.body = await req(ctx, opts)
}
// 提现审核迭代
// 获取钱包账户列表
exports.getAccountList = async ctx => {
const url = `${WITHDRAWAL_URI}/wallet/background/account_list`;
const opts = {
url,
method: "GET",
qs: ctx.request.query
}
ctx.body = await req(ctx, opts)
}
// 获取钱包账户流水列表
exports.getRecordList = async ctx => {
const url = `${WITHDRAWAL_URI}/wallet/background/record_list`;
const opts = {
url,
method: "GET",
qs: ctx.request.query
}
ctx.body = await req(ctx, opts)
}
// 钱包账户黑名单
exports.getAccountBlackList = async ctx => {
const url = `${WITHDRAWAL_URI}/wallet/background/blacklist`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
}
ctx.body = await req(ctx, opts)
}
// 钱包账户释放
exports.getReblackList = async ctx => {
const url = `${WITHDRAWAL_URI}/wallet/background/reblacklist`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
}
ctx.body = await req(ctx, opts)
}
const getUserPermission = async (ctx) => {
const url = `${WITHDRAWAL_URI}/merchant/authority/get_role_list`;
const { email, op_cur_user } = ctx.request.query;
......
......@@ -63,36 +63,11 @@ router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info)
router.get(`${API_VERSION}/merchant/lifeinner/life_list`, life.get_life_list)
//用户
router.post(`${API_VERSION}/merchant/authority/get_user_info`, user.getUser_detail)
// 团餐运营--配送
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/add_deliverer`, groupmeal.getAddDeliverer)
router.post(`${API_VERSION}/order/deliverer/save_day_deliverer`, groupmeal.getSaveDeliverer)
// 订单管理
router.get(`${API_VERSION}/order/background/order_list`, groupmeal.getOrderList);
router.get(`${API_VERSION}/order/background/marketing_list`, groupmeal.getMarketingList);
router.get(`${API_VERSION}/order/background/goods_list`, groupmeal.getGoodsList);
router.get(`${API_VERSION}/order/background/sub_shop_list`, groupmeal.getSubShopList);
router.get(`${API_VERSION}/order/background/order_export`, groupmeal.orderExport);
router.get(`${API_VERSION}/order/background/order_export`, groupmeal.orderExport);
router.get(`${API_VERSION}/order/background/order_print`, groupmeal.orderPrint);
router.get(`${API_VERSION}/order/background/order_item_list`, groupmeal.orderItemList);
router.get(`${API_VERSION}/order/background/order_refund_reject`, groupmeal.orderRefundReject);
router.post(`${API_VERSION}/order/background/order_refund`, groupmeal.orderRefund);
// 钱包提现审核 wallet/background/apply_detail
router.get(`${API_VERSION}/get_withdrawal_apply_list`, withdrawal.getApplyList)
router.post(`${API_VERSION}/get_withdrawal_black_list`, withdrawal.getBlackList)
router.post(`${API_VERSION}/get_withdraw_audit`, withdrawal.getWithdrawAudit)
router.post(`${API_VERSION}/get_freezing_fund`, withdrawal.getFreezingFund)
router.get(`${API_VERSION}/get_apply_detail`, withdrawal.getApplyDetail)
// 后台运营管理
router.get(`${API_VERSION}/marketing/background/marketing_list`, activity.getActivityList)
router.get(`${API_VERSION}/order/background/pindan_marketing_info_data_statistics`, activity.checkActivityDetailInfo)
router.post(`${API_VERSION}/goods/background/edit_goods`, activity.editGoodsDetail)
router.post(`${API_VERSION}/marketing/background/update_marketing`, activity.updateActivity)
router.post(`${API_VERSION}/marketing/background/update_marketing_online_status`, activity.updateActivity)
router.post(`${API_VERSION}/marketing/background/marketing_info`, activity.checkActivityDetail)
//
router.get(`${API_VERSION}/marketing/background/take_place_list`, activity.getPlaceList)
......@@ -102,11 +77,50 @@ router.get(`${API_VERSION}/goods/background/ota_list`, activity.getBusinessList)
router.post(`${API_VERSION}/goods/background/add_goods`, activity.addGoods);
router.get(`${API_VERSION}/goods/background/pindan_goods`, activity.pindanGoods);
router.get(`${API_VERSION}/goods/background/marketing_goods_info`, activity.markGoodsInfo);
router.post(`${API_VERSION}/goods/background/edit_goods`, activity.editGoods);
router.post(`${API_VERSION}/goods/background/edit_activity_goods`, activity.editGoods);
router.post(`${API_VERSION}/marketing/background/add_marketing`, activity.addMarketing);
router.post(`${API_VERSION}/marketing/background/marketing_info`, activity.marketingInfo);
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)
router.post(`${API_VERSION}/order/deliverer/add_deliverer`, groupmeal.getAddDeliverer)
router.post(`${API_VERSION}/order/deliverer/save_day_deliverer`, groupmeal.getSaveDeliverer)
// 老订单管理
router.get(`${API_VERSION}/order/oldbackground/order_list`, groupmeal.getOrderList);
router.get(`${API_VERSION}/order/oldbackground/marketing_list`, groupmeal.getMarketingList);
router.get(`${API_VERSION}/order/oldbackground/goods_list`, groupmeal.getGoodsList);
router.get(`${API_VERSION}/order/oldbackground/sub_shop_list`, groupmeal.getSubShopList);
router.get(`${API_VERSION}/order/oldbackground/order_export`, groupmeal.orderExport);
router.get(`${API_VERSION}/order/oldbackground/order_print`, groupmeal.orderPrint);
router.get(`${API_VERSION}/order/oldbackground/order_item_list`, groupmeal.orderItemList);
router.get(`${API_VERSION}/order/oldbackground/order_refund_reject`, groupmeal.orderRefundReject);
router.post(`${API_VERSION}/order/oldbackground/order_refund`, groupmeal.orderRefund);
// 新订单管理
router.get(`${API_VERSION}/order/background/order_list`, groupmeal.newGetOrderList);
router.get(`${API_VERSION}/order/background/order_condition_marketing_list`, groupmeal.newGetMarketingList);
router.get(`${API_VERSION}/order/background/order_condition_goods_list`, groupmeal.newGetGoodsList);
router.get(`${API_VERSION}/order/background/order_condition_take_place_list`, groupmeal.newGetSubShopList);
router.get(`${API_VERSION}/order/background/order_export`, groupmeal.newOrderExport);
router.get(`${API_VERSION}/order/background/order_print`, groupmeal.newOrderPrint);
router.get(`${API_VERSION}/order/background/order_item_list`, groupmeal.newOrderItemList);
router.get(`${API_VERSION}/order/background/order_refund_reject`, groupmeal.newOrderRefundReject);
router.post(`${API_VERSION}/order/background/order_refund`, groupmeal.newOrderRefund);
// 钱包提现审核
router.get(`${API_VERSION}/get_withdrawal_apply_list`, withdrawal.getApplyList)
router.post(`${API_VERSION}/get_withdrawal_black_list`, withdrawal.getBlackList)
router.post(`${API_VERSION}/get_withdraw_audit`, withdrawal.getWithdrawAudit)
router.post(`${API_VERSION}/get_freezing_fund`, withdrawal.getFreezingFund)
router.get(`${API_VERSION}/get_apply_detail`, withdrawal.getApplyDetail)
// 钱包账户
router.get(`${API_VERSION}/get_account_list`, withdrawal.getAccountList)
router.get(`${API_VERSION}/get_record_list`, withdrawal.getRecordList)
router.post(`${API_VERSION}/get_account_black_list`, withdrawal.getAccountBlackList)
router.post(`${API_VERSION}/get_reblack_list`, withdrawal.getReblackList)
module.exports = router;
module.exports = router;
\ No newline at end of file
<template>
<el-dialog
title="提示"
v-model="dialogVisible"
width="30%"
:before-close="handleClose"
>
<span>这是一段信息</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</template>
</el-dialog>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {
dialogVisible: true
};
},
watch: {},
computed: {},
methods: {},
created() {},
mounted() {}
};
</script>
<style lang="less" scoped></style>
......@@ -6,36 +6,39 @@
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
>
<!-- 商品详情信息 -->
<div class="activityInfo-wrapper">
<el-card class="activityInfo">
<div class="infoItem">
<p class="infoItemText">{{ detailInfo.order_count }}</p>
<p class="infoItemText">{{ detailInfo.sumOrder }}</p>
<p>订单数量</p>
</div>
<div class="infoItem">
<p class="infoItemText">{{ detailInfo.sold_goods_count }}</p>
<p class="infoItemText">{{ detailInfo.sumGoods }}</p>
<p>已售商品数量</p>
</div>
<div class="infoItem">
<p class="infoItemText">{{ detailInfo.pay_amount_count }}</p>
<p class="infoItemText">{{ detailInfo.payAmount }}</p>
<p>支付金额</p>
</div>
<div class="infoItem">
<p class="infoItemText">{{ detailInfo.discount_amount_count }}</p>
<p class="infoItemText">{{ detailInfo.sumCouponAmount }}</p>
<p>优惠金额</p>
</div>
<div class="infoItem">
<p class="infoItemText">{{ detailInfo.refund_count }}</p>
<p class="infoItemText">{{ detailInfo.refundAmount }}</p>
<p>退款</p>
</div>
<div class="infoItem">
<p class="infoItemText">{{ detailInfo.real_income_count }}</p>
<p class="infoItemText">{{ detailInfo.income }}</p>
<p>实际收入</p>
</div>
</el-card>
</div>
<!-- 商品详情 -->
<div class="activityDetail">
<section class="content">
<!-- 商品列表 -->
<el-card class="activityGoods box-card">
<div class="my-header">
<h3>{{ marketingInfo.marketing_name }}</h3>
......@@ -58,6 +61,7 @@
</div>
</div>
</el-card>
<!-- 商品描述 -->
<el-card class="activityIntroduce box-card">
<p class="introduceText">
{{ marketingInfo.pindan_desc }}
......@@ -84,7 +88,7 @@
fit="fit"
></el-image>
<div class="itemIntroduce">
<p>{{ goodsItem.desc }}</p>
<p>{{ goodsItem.goods_name }}</p>
<p class="price">
<span class="nowPrice">{{ `¥${goodsItem.price}` }}</span>
<span class="originPrice">{{
......@@ -96,6 +100,15 @@
</el-card>
</section>
</div>
<div class="button-close">
<el-button
class="button-block"
size="medium"
type="primary"
@click="closePage"
> </el-button
>
</div>
</div>
</template>
......@@ -105,7 +118,6 @@ import { ElMessage } from "element-plus";
import dayJs from "dayjs";
export default {
components: {},
props: {},
data() {
return {
......@@ -132,10 +144,6 @@ export default {
marketing_id: this.$route.query.marketing_id
})
]);
// let data = await ActivityService.checkActivityDetail({
// marketing_id: this.$route.query.marketing_id,
// marketing_type: this.$route.query.marketing_type
// });
this.pageLoading = false;
this.goodsList = dataArr[0].result.goods_list;
......@@ -171,6 +179,8 @@ export default {
this.showTimer = "已结束";
}
},
// 定时器
myTimer() {
let dateNow = dayJs();
this.timer = setInterval(() => {
......@@ -181,6 +191,10 @@ export default {
clearInterval(this.timer);
}
}, 1000);
},
closePage() {
this.$router.go(-1);
}
},
async created() {
......@@ -196,6 +210,7 @@ export default {
.wrapper {
height: 100%;
display: flex;
overflow-y: scroll;
flex-direction: column;
justify-content: flex-start;
align-items: center;
......@@ -214,9 +229,6 @@ export default {
.infoItemText {
font-weight: bolder;
}
// display: flex;
// align-items: center;
// justify-content: center;
}
}
.activityDetail {
......@@ -287,5 +299,11 @@ export default {
}
}
}
.button-close {
margin: 10px 0 30px;
.button-block {
width: 200px;
}
}
}
</style>
This diff is collapsed.
......@@ -14,15 +14,17 @@
</el-form-item>
<el-form-item label="图片:">
<el-upload
:class="{ hide: hideUpload }"
:data="{ type: 1 }"
:action="uploadUrl"
:on-preview="previewImage"
:on-success="handleDetailSuccess"
:on-change="handleDetailChange"
:before-remove="removeDetailFiles"
:file-list="infoEditForm.picUrlList"
auto-upload
ref="picUpload"
:limit="9"
:limit="limitCount"
list-type="picture-card"
multiple
>
......@@ -43,9 +45,14 @@
import { GOODS_URI } from "../../../../../server/config";
export default {
props: {
editInfo: {
infoEditArr: {
type: Object,
required: () => {}
default: () => {
return {
pindan_pic_url: []
};
},
require: true
}
},
data() {
......@@ -56,13 +63,37 @@ export default {
picUploadList: [], // 上传详情图片列表
picUrlList: [] // 图片回显列表
},
picSubmitList: [], // 发布功能需要的图片列表
propData: {},
isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload` // 金山云上传地址
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
hideUpload: false,
limitCount: 9
};
},
watch: {
infoEditArr: {
// 监听props属性 展示自提点列表
handler: function(newVal) {
if (this.$route.query.marketing_id) {
this.propData = newVal;
this.infoEditForm.title = this.propData.marketing_name;
this.infoEditForm.desc = this.propData.pindan_desc;
for (var i in this.propData.pindan_pic_url) {
this.infoEditForm.picUrlList.push({
url: this.propData.pindan_pic_url[i]
});
this.picSubmitList.push({
url: this.propData.pindan_pic_url[i]
});
}
this.hideUpload = this.picSubmitList.length >= this.limitCount; // 大于9 隐藏
}
},
deep: true,
immediate: true
}
},
methods: {
// 展示商品大图
previewImage(file) {
......@@ -70,18 +101,28 @@ export default {
this.isShowPopver = true;
},
handleDetailChange() {
this.hideUpload = this.picSubmitList.length >= this.limitCount;
},
// 图片上传成功时
handleDetailSuccess(res) {
this.infoEditForm.picUploadList.push(res.result.image_id);
this.infoEditForm.picUploadList.push(res.result.image_id); // 上传成功图片的id
this.picSubmitList.push({
// 发布功能需要的图片列表
url: res.result.url
});
this.hideUpload = this.picSubmitList.length >= this.limitCount;
},
// 图片删除后
removeDetailFiles(file, fileList) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid == file.uid) {
this.infoEditForm.picUploadList.splice(i, 1);
this.picSubmitList.splice(i, 1);
}
}
this.hideUpload = this.picSubmitList.length >= this.limitCount;
},
// 获取营销活动详情
......@@ -101,7 +142,7 @@ export default {
}
},
created() {
this.marketingInfoMet();
// this.marketingInfoMet();
}
};
</script>
......@@ -111,4 +152,7 @@ export default {
width: 64%;
margin: 0 auto;
}
.hide /deep/ .el-upload--picture-card {
display: none;
}
</style>
<template>
<div id="map" class="mapContainer">
<!-- map -->
<div class="mapWrapper">
<div class="search">
<el-form-item label-position="left">
<el-button @click="handleSearch">搜索</el-button>
<el-input
class="dialog-input"
v-model="searchKey"
placeholder="请输入关键字"
autocomplete="off"
></el-input>
</el-form-item>
<el-form ref="form" label-width="80px">
<el-form-item label-position="left">
<el-button @click="handleSearch">搜索</el-button>
<el-input
class="dialog-input"
v-model="searchKey"
placeholder="请输入关键字"
autocomplete="on"
>
<template #suffix>
<i
@click="searchKey = ''"
class="el-input__icon el-icon-close"
></i>
</template>
</el-input>
</el-form-item>
</el-form>
<div id="js-result" v-show="searchKey" class="result"></div>
</div>
<div id="js-container" class="myMap">
正在加载数据 ...
</div>
</div>
<!-- info -->
<div class="mapInfo">
<!-- <div class="search" v-if="placeSearch">
<input type="text" placeholder="请输入关键字" v-model="searchKey" />
<button type="button" @click="handleSearch">搜索</button>
<div id="js-result" v-show="searchKey" class="result"></div>
</div> -->
<h3 class="title">拖拽选址</h3>
<ul class="info">
<li><span>经度:</span>{{ dragData.lng }}</li>
......@@ -34,6 +35,10 @@
<li><span>地址:</span>{{ dragData.address }}</li>
</ul>
</div>
<div class="confirmButton">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确 定</el-button>
</div>
</div>
</template>
......@@ -43,6 +48,7 @@ export default {
name: "app",
data() {
return {
dialogVisible: true,
MapCityName: "北京",
searchKey: "",
dragData: {
......@@ -56,6 +62,15 @@ export default {
};
},
methods: {
// 取消
cancel() {
this.$emit("hideMapDialog", false);
},
// 确认
confirm() {
this.$emit("getMapInfo", this.dragData);
this.$emit("hideMapDialog", false);
},
// 搜索
handleSearch() {
if (this.searchKey) {
......@@ -75,7 +90,6 @@ export default {
// 初始化地图
initMap() {
let that = this;
// 加载PositionPicker,loadUI的路径参数为模块名中 'ui/' 之后的部分
let AMapUI = (this.AMapUI = window.AMapUI);
let AMap = (this.AMap = window.AMap);
......@@ -144,18 +158,18 @@ export default {
// 创建地图拖拽
let positionPicker = new PositionPicker({
mode: "dragMap", // 设定为拖拽地图模式,可选'dragMap'、'dragMarker',默认为'dragMap'
map: map // 依赖地图对象
map: map, // 依赖地图对象
iconStyle: {
//自定义外观
url: "//webapi.amap.com/ui/1.0/assets/position-picker2.png", //图片地址
size: [50, 50], //要显示的点大小,将缩放图片
ancher: [24, 40] //锚点的位置,即被size缩放之后,图片的什么位置作为选中的位置
}
});
// 拖拽完成发送自定义 drag 事件
positionPicker.on("success", positionResult => {
// 过滤掉初始化地图后的第一次默认拖放
if (!this.dragStatus) {
this.dragStatus = true;
} else {
this.dragMap(positionResult);
that.$emit("getMapInfo", this.dragData);
}
this.dragMap(positionResult);
});
// 启动拖放
positionPicker.start();
......@@ -179,6 +193,15 @@ export default {
</script>
<style lang="less" scoped>
.mapDialog {
margin-top: 11vh !important;
display: flex !important;
flex-direction: column !important;
background: red !important;
/deep/ .el-dialog__body {
height: 90%;
}
}
.mapContainer {
height: 100%;
width: 100%;
......@@ -199,7 +222,7 @@ export default {
}
.myMap {
height: 100%;
height: 500px;
height: 100%;
}
}
.mapInfo {
......@@ -213,6 +236,11 @@ export default {
text-align: left;
}
}
.confirmButton {
position: absolute;
bottom: 100px;
right: 100px;
}
}
.m-map .search {
position: absolute;
......@@ -228,66 +256,4 @@ export default {
padding: 5px;
outline: none;
}
// .g-wraper {
// width: 1000px;
// margin: 0 auto;
// color: #666;
// font-size: 16px;
// line-height: 30px;
// }
// .m-part {
// margin-bottom: 30px;
// }
// .m-part::after {
// content: "";
// display: block;
// clear: both;
// }
// .m-part .title {
// font-size: 30px;
// line-height: 60px;
// margin-bottom: 10px;
// color: #333;
// }
// .m-part .mapbox {
// width: 600px;
// height: 400px;
// margin-bottom: 20px;
// float: left;
// }
// .m-part .info {
// margin: 0;
// padding: 0;
// list-style: none;
// line-height: 30px;
// margin-left: 620px;
// }
// .m-part .info span {
// display: block;
// color: #999;
// }
// .m-part ol {
// line-height: 40px;
// margin-left: 0;
// padding-left: 0;
// }
// .m-part pre {
// padding: 10px 20px;
// line-height: 30px;
// border-radius: 3px;
// box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
// }
// .m-footer {
// background: #eee;
// line-height: 60px;
// text-align: center;
// color: #999;
// font-size: 12px;
// }
// .m-footer a {
// margin: 0 5px;
// color: #999;
// text-decoration: none;
// }
</style>
......@@ -7,8 +7,8 @@
class="startTimePicker"
v-model="startDate"
type="datetime"
popper-class="date_picker"
:disabledDate="pickerOptions.disabledDateStart"
:default-value="new Date()"
placeholder="拼单开始时间"
@change="changeStartTime"
>
......@@ -16,15 +16,14 @@
<el-date-picker
class="endTimePicker"
v-model="endDate"
:clearable="false"
type="datetime"
:default-value="new Date()"
placeholder="拼单结束时间"
:disabledDate="pickerOptions.disabledDateEnd"
:disabledDate="option1"
@change="changeEndTime"
>
</el-date-picker>
</div>
<!-- 自提点列表 -->
<div
class="card-wrapper"
......@@ -35,7 +34,7 @@
>
<el-card class="card-block">
<p>自提点设置</p>
<el-form ref="form" :model="selfLiftingPoint" label-width="80px">
<el-form ref="form" label-width="80px">
<el-form-item>
<el-input
class="set"
......@@ -166,11 +165,8 @@
placeholder=""
:disabled="true"
></el-input>
<a
href="javascript:;"
style="margin-left: 30px"
@click="mapDialogVisible = true"
>从高德获取坐标</a
<el-button type="primary" @click="mapDialogVisible = true"
>从高德获取坐标</el-button
>
</el-form-item>
<p class="location">{{ form.location }}</p>
......@@ -212,13 +208,11 @@
<!-- 地图 dialog -->
<el-dialog custom-class="mapDialog" v-model="mapDialogVisible" width="100%">
<my-map class="my-map" @getMapInfo="getMapInfo" />
<div class="confirmButton">
<el-button @click="mapDialogVisible = false"> </el-button>
<el-button type="primary" @click="mapDialogVisible = false"
> </el-button
>
</div>
<my-map
class="my-map"
@getMapInfo="getMapInfo"
@hideMapDialog="mapDialogVisible = false"
/>
</el-dialog>
</div>
</template>
......@@ -239,28 +233,19 @@ let checkphone = (rule, value, callback) => {
callback();
}
};
export default {
data() {
return {
startDate: dayJs(), //开始时间
endDate: dayJs().add(7, "day"), // 结束时间
startDate: dayJs().format("YYYY-MM-DD HH:mm:ss"), //开始时间
endDate: dayJs()
.add(7, "day")
.format("YYYY-MM-DD HH:mm:ss"), // 结束时间
pickerOptions: {
disabledDateStart(time) {
let _now = Date.now();
// let three = 3 * 24 * 60 * 60 * 1000;
let threeDays = _now + 3 * 24 * 60 * 60 * 1000;
return time.getTime() < _now || time.getTime() > threeDays; //大于当前的禁止,小于3天前的禁止
},
disabledDateEnd(time) {
let _now = null;
if (this.startDate) {
_now = this.startDate;
} else {
_now = Date.now();
}
let ninety = 90 * 24 * 60 * 60 * 1000;
let ninetyDays = _now + ninety;
return time.getTime() < _now || time.getTime() > ninetyDays; //大于当前的禁止,小于90天前的禁止
return time.getTime() < _now - 8.64e7 || time.getTime() > threeDays; //大于当前的禁止,小于3天前的禁止
}
},
mapDialogVisible: false,
......@@ -270,7 +255,9 @@ export default {
{ required: true, message: "请输入自提点名称", trigger: "blur" },
{ min: 0, max: 30, message: "长度在 0 到 30 个字符", trigger: "blur" }
],
location: [{ required: true, message: "请输入位置", trigger: "blur" }],
location: [
{ required: true, message: "请输入位置", trigger: "change" }
],
address: [
{ required: true, message: "请输入详细地址", trigger: "blur" }
],
......@@ -306,16 +293,32 @@ export default {
} // 添加自提点 详细信息
};
},
computed: {
option1() {
let _this = this;
return function(time) {
let _now = Date.now();
let ninety = 90 * 24 * 60 * 60 * 1000;
let ninetyDays = _now + ninety;
return (
time.getTime() < _this.startDate - 8.64e7 ||
time.getTime() < _now - 8.64e7 ||
time.getTime() > ninetyDays
); //大于当前的禁止,小于90天前的禁止
};
}
},
props: {
spellOrderSetArr: {
type: Array,
default: () => []
},
startTime1: {
startTime: {
type: String,
default: ""
},
endTime1: {
endTime: {
type: String,
default: ""
}
......@@ -334,8 +337,8 @@ export default {
if (this.$route.query.marketing_id) {
await this.getPlaceList();
// 时间赋值
this.startDate = this.startTime1;
this.endDate = this.endTime1;
this.startDate = this.startTime;
this.endDate = this.endTime;
this.checkedTakePlacelist = this.setTableListData(
this.spellOrderSetArr
); // 选中的自提点列表
......@@ -404,11 +407,13 @@ export default {
// 添加自提点
async addPlace() {
let params = Object.assign(this.form, {
take_place_id: this.id //搜索关键词
take_place_id: this.id, //搜索关键词
contact_name:this.form.contactor
});
try {
this.pageLoading = true;
await ActivityService.addPlace(params);
await this.getPlaceList();
this.pageLoading = false;
} catch {
this.pageLoading = false;
......@@ -421,7 +426,7 @@ export default {
let result = data.map(item => {
return {
name: item.take_place_name,
location: item.province + item.city + item.area, // p + c + a
location: item.location, // p + c + a
address: item.address,
contactor: item.contact_name,
id: item.take_place_id
......@@ -504,8 +509,8 @@ export default {
this.form.province = mapInfo.province;
this.form.city = mapInfo.city;
this.form.area = mapInfo.area;
this.form.longitude = mapInfo.lat; // longitude latitude contactor
this.form.latitude = mapInfo.lng;
this.form.longitude = mapInfo.lng; // longitude latitude contactor
this.form.latitude = mapInfo.lat;
}
},
created() {
......@@ -517,6 +522,16 @@ export default {
</script>
<style lang="less" scope>
.el-picker-panel {
.el-picker-panel__footer {
.el-button--text {
display: none;
}
}
}
</style>
<style lang="less">
.card-wrapper {
width: 100%;
//height: 500px;
......@@ -571,17 +586,14 @@ export default {
justify-content: center;
align-items: center;
}
// mapDialog
.mapDialog {
height: 80%;
margin-top: 10vh !important;
.my-map {
height: 10%;
.el-dialog__body {
height: 85% !important;
}
.confirmButton {
position: absolute;
bottom: 100px;
right: 100px;
.my-map {
height: 100%;
}
}
</style>
......@@ -16,20 +16,21 @@
<infoEditing
ref="infoEdit"
v-show="active === 1"
:editInfo="infoEditArr"
:infoEditArr="infoEditArr"
/>
<addProduc
ref="addProduc"
v-show="active === 2"
:editInfo="infoEditArr"
:addProduc="addProducArr"
:editInfo="infoEditArr"
:stepTwoTitle="stepTwoTitle"
/>
<spellOrderSet
ref="spellOrderSet"
v-show="active === 3"
:spellOrderSetArr="spellOrderSetArr"
:startTime1="startTime"
:endTime1="endTime"
:startTime="startTime"
:endTime="endTime"
@getTakeTakePlaceListFromChild="getTakeTakePlaceListFromChild"
/>
</div>
......@@ -49,7 +50,7 @@
</template>
<script>
import store from "../../../store/index";
import dayJs from "dayjs";
import { ElMessage } from "element-plus";
import infoEditing from "./components/infoEditing.vue";
import addProduc from "./components/addProduc.vue";
......@@ -74,7 +75,10 @@ export default {
spellOrderSetArr: [],
startDate: "", // 开始时间
endDate: "", // 结束时间
takePlaceIDArr: []
takePlaceIDArr: [],
startTime: "",
endTime: "",
stepTwoTitle: "" // 传给addProduct的title
};
},
......@@ -91,7 +95,7 @@ export default {
ElMessage.error("请填写商品标题");
return;
}
this.infoEditArr.title = this.$refs.infoEdit.infoEditForm.title;
this.stepTwoTitle = this.$refs.infoEdit.infoEditForm.title;
this.active = 2;
} else if (this.active === 2) {
if (this.$refs.addProduc.comTableData.length == 0) {
......@@ -100,10 +104,7 @@ export default {
}
this.addProducArr = this.$refs.addProduc.comTableData;
this.active = 3;
} else {
console.log();
}
// this.active++;
},
// 获取营销活动详情
......@@ -132,6 +133,16 @@ export default {
// 确认发布
async confirmRelease() {
function getUrlParms(path, name) {
var reg = new RegExp("(^|\\?|&)" + name + "=([^&]*)(\\s|&|$)", "i");
if (reg.test(path)) return unescape(RegExp.$2.replace(/\+/g, " "));
return "";
}
let list = this.$refs.infoEdit.picSubmitList.map(item => {
let rs = getUrlParms(item.url, "url");
return rs;
});
let picList = list.join(",");
for (var i in this.addProducArr) {
this.goodsSkuIDArr.push(this.addProducArr[i].goods_sku_id);
}
......@@ -145,10 +156,10 @@ export default {
goods_sku_id: this.goodsSkuIDArr.join(","),
marketing_name: this.$refs.infoEdit.infoEditForm.title,
marketing_type: "4",
op_cur_user: store.state.userInfo.email,
start_time: this.startDate,
end_time: this.endDate,
pindan_pic: this.$refs.infoEdit.infoEditForm.picUploadList.join(","),
op_cur_user: this.$store.state.userInfo.email,
start_time: dayJs(this.startDate).format("YYYY-MM-DD HH:mm:ss"),
end_time: dayJs(this.endDate).format("YYYY-MM-DD HH:mm:ss"),
pindan_pic: picList,
pindan_desc: this.$refs.infoEdit.infoEditForm.desc,
take_place_ids: this.takePlaceIDArr
};
......
......@@ -1198,6 +1198,17 @@ export default {
val = 0;
return this.$message.error("原价价格必为数字");
}
const parseOriginalPrice = Number(this.goodsObj.original_price).toFixed(
2
);
this.goodsObj.original_price = Number(parseOriginalPrice);
// if (
// typeof this.goodsObj.original_price === "number" &&
// isNaN(this.goodsObj.original_price)
// ) {
// this.goodsObj.original_price = "";
// return this.$message.error("原价价格必为数字");
// }
},
// 审核通过
......@@ -1315,10 +1326,6 @@ export default {
}
console.log(query);
// 是否该商品关联的分销活动满足售价-分销总金额>=结算价
// if (query.price - d >= query.clear_price) {
// return this.$message.error("请至少选择一个门店");
// }
const res = await editGoods(query);
if (res.code !== 0) {
......
......@@ -2,10 +2,7 @@
<layout>
<el-card class="goods">
<!-- 筛选区 -->
<el-form
inline
class="search_condition"
>
<el-form inline class="search_condition">
<!-- 商品id -->
<el-form-item label="商品id">
<el-input v-model="searchProps.goods_spu_id"></el-input>
......@@ -66,21 +63,13 @@
</el-form-item>
<!-- 按钮操作 -->
<el-form-item style="justify-self: flex-end;">
<el-button
@click="searchList"
type="primary"
>搜索</el-button>
<el-button @click="searchList" type="primary">搜索</el-button>
<el-button @click="resetList">重置</el-button>
</el-form-item>
</el-form>
<!-- 列表区 -->
<el-table
class="goods_list"
:data="goodsList"
border
stripe
>
<el-table class="goods_list" :data="goodsList" border stripe>
<el-table-column
label="商品id"
prop="goods_spu_id"
......@@ -116,36 +105,33 @@
prop="publish_user_id"
align="center"
></el-table-column>
<el-table-column
label="状态"
align="center"
>
<el-table-column label="状态" align="center">
<template #default="scope">
<span
v-if="scope.row.audit_status == 0"
style="color:#FF982C;"
>待审核</span>
<span
v-if="scope.row.audit_status == 1"
style="color:#5CC247;"
>审核通过</span>
<span
v-if="scope.row.audit_status == 2"
style="color:#FD6B6F;"
>审核驳回</span>
<span v-if="scope.row.audit_status == 0" style="color:#FF982C;"
>待审核</span
>
<span v-if="scope.row.audit_status == 1" style="color:#5CC247;"
>审核通过</span
>
<span v-if="scope.row.audit_status == 2" style="color:#FD6B6F;"
>审核驳回</span
>
&nbsp;&nbsp;&nbsp;
<span
v-if="scope.row.online_status == 0 && scope.row.audit_status != 2"
style="color:#FF982C;"
>未上架</span>
>未上架</span
>
<span
v-if="scope.row.online_status == 1 && scope.row.audit_status != 2"
style="color:#5CC247;"
>已上架</span>
>已上架</span
>
<span
v-if="scope.row.online_status == 2 && scope.row.audit_status != 2"
style="color:#FD6B6F;"
>已下架</span>
>已下架</span
>
</template>
</el-table-column>
<el-table-column
......@@ -159,26 +145,23 @@
align="center"
></el-table-column>
<!-- 操作快捷键 -->
<el-table-column
label="操作"
align="center"
fixed="right"
width="200"
>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template #default="scope">
<el-button
type="text"
@click="goDetail(`EDIT`, scope.row.goods_spu_id)"
>编辑</el-button>
>编辑</el-button
>
<el-button
v-if="scope.row.audit_status == 0"
type="text"
@click="goDetail(`AUDIT`, scope.row.goods_spu_id)"
>审核</el-button>
>审核</el-button
>
<el-popconfirm
v-if="scope.row.online_status == 2 "
v-if="scope.row.online_status == 2"
title="您确定要上架该商品吗?"
cancelButtonType="default"
@confirm="changeGoodsState('GROUNDING', scope.row.goods_spu_id)"
......@@ -189,7 +172,10 @@
</el-popconfirm>
<el-popconfirm
v-if=" scope.row.online_status != 2 && (scope.row.audit_status == 1 || scope.row.online_status == 1) "
v-if="
scope.row.online_status != 2 &&
(scope.row.audit_status == 1 || scope.row.online_status == 1)
"
title="您确定要下架该商品吗?"
cancelButtonType="default"
@confirm="
......@@ -202,9 +188,10 @@
</el-popconfirm>
<el-button
@click="goDetail(`DETAIL`,scope.row.goods_spu_id)"
@click="goDetail(`DETAIL`, scope.row.goods_spu_id)"
type="text"
>详情</el-button>
>详情</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -240,14 +227,14 @@ export default {
Layout
},
created () {
created() {
// 获取级联选择
this.getOptionList();
// 获取商品列表
this.getCommodityList();
},
data () {
data() {
return {
// 级联选择器参数
cascaderProps: {
......@@ -300,7 +287,7 @@ export default {
methods: {
// 获取级联选择
async getOptionList () {
async getOptionList() {
try {
const res = await getGoodsList();
if (res.code !== 0) return this.$message.error(res.reason);
......@@ -310,20 +297,20 @@ export default {
}
},
// 获取数组返回值并转换为字符串
getVal (value, index = 0) {
getVal(value, index = 0) {
const valueArray = value.map(item => {
return item[index];
});
return valueArray.join();
},
getValue (value) {
getValue(value) {
const values = value.map(item => {
return item;
});
return values.join();
},
// 获取列表
async getCommodityList () {
async getCommodityList() {
try {
const res = await getList(this.searchProps);
if (res.code !== 0) return this.$message.error(res.reason);
......@@ -335,25 +322,25 @@ export default {
}
},
// 所属分类赋值
handleTypeChange (val) {
handleTypeChange(val) {
this.searchProps.category_1_id = this.getVal(val, 0);
this.searchProps.category_2_id = this.getVal(val, 1);
},
// 审核状态赋值
handleStatusChange (val) {
handleStatusChange(val) {
this.searchProps.audit_status = this.getValue(val);
},
// 上架状态赋值
handleOnlineStatusChange (val) {
handleOnlineStatusChange(val) {
this.searchProps.online_status = this.getValue(val);
},
// 按条件搜索
searchList () {
searchList() {
console.log(this.searchProps);
this.getCommodityList();
},
// 重置表单
resetList () {
resetList() {
this.searchProps = {
page: 1, // 页码
page_size: 20, // 页数大小
......@@ -372,7 +359,7 @@ export default {
this.getCommodityList();
},
// 上架/下架操作
async changeGoodsState (state, spuId) {
async changeGoodsState(state, spuId) {
// 上架操作
if (state === "GROUNDING") {
const res = await putOnline(spuId);
......@@ -389,14 +376,14 @@ export default {
},
// 页码变化
handleCurrentChange (e) {
handleCurrentChange(e) {
this.searchProps.page = e;
// 获取信息
this.getCommodityList();
},
// 去往详情页
goDetail (operation, spuId) {
goDetail(operation, spuId) {
console.log(spuId);
this.$router.push({ name: "GoodsDetail", params: { operation, spuId } });
}
......
......@@ -77,7 +77,6 @@
? (scope.row.first_commission_value + (scope.row.commission_mode==1 ? "%" : '元'))
: "0%"
}}
{{ scope.row.first_commission_value + (scope.row.commission_mode==1 && "%" || '元') }}
</span>
</template>
</el-table-column>
......@@ -208,6 +207,7 @@
<el-form-item
label="金额计算方式:"
prop="commission_mode"
:disable="disabled"
>
<el-radio-group
v-model="ruleForm.commission_mode"
......@@ -223,7 +223,7 @@
@input="changeValue($event, 'first_commission_value')"
:disabled="shopStart !== 0"
>
<template #append>{{ruleForm.commission_mode == 1? '%' : '¥'}}</template>
<template #append>%</template>
</el-input>
</el-form-item>
<el-form-item label="分享者佣金: " prop="second_commission_value">
......@@ -233,7 +233,7 @@
@input="changeValue($event, 'second_commission_value')"
:disabled="shopStart !== 0"
>
<template #append>{{ruleForm.commission_mode == 1? '%' : '¥'}}</template>
<template #append>%</template>
</el-input>
</el-form-item>
<el-form-item label="活动生效时间:">
......@@ -391,11 +391,10 @@ export default {
};
var commissionSec = async (rule, value, callback) => {
if (
this.ruleForm.commission_mode == 1 &&
(this.ruleForm.first_commission_value +
this.ruleForm.first_commission_value +
this.ruleForm.second_commission_value >
50 ||
value > 50 )
value > 50
) {
callback(new Error("上线佣金与分享者佣金之和不可大于50%"));
} else if (
......@@ -437,7 +436,6 @@ export default {
ruleForm: {
marketing_name: "",
commission_mode: 1,
first_commission_value: "",
second_commission_value: "",
start_time: "",
......@@ -647,7 +645,6 @@ export default {
let {
marketing_name,
first_commission_value,
commission_mode,
second_commission_value,
} = this.ruleForm;
let [start_time, end_time] = this.timeSelect || [];
......@@ -662,7 +659,6 @@ export default {
}
let addParams = {
goods_sku_id,
commission_mode,
marketing_name,
first_commission_value: first_commission_value + "",
second_commission_value: second_commission_value + "",
......
......@@ -7,14 +7,13 @@
<div class="main">
<slot></slot>
</div>
</div>
</template>
<script>
import PageHeader from '../components/PageHeader';
import PageHeader from "../components/PageHeader";
export default {
components: { PageHeader },
components: { PageHeader }
};
</script>
......
......@@ -34,12 +34,12 @@
</el-table-column>
<el-table-column prop="prop" label="操作" width="width" align="center">
<template #default="scope">
<el-button type="primary" @click="handleModify(scope.row)"
<el-button type="primary" @click="handleModify(scope.row)"
>修改</el-button
>
<el-button
type="primary"
v-show=scope.row.url
v-show="scope.row.url"
@click="handleDownload(scope.row.url)"
>下载配送路线</el-button
>
......@@ -48,10 +48,10 @@
</el-table>
<!-- 页码区 -->
<Pagination
@current-change="handleCurrentChange"
v-model:current-page="page"
:page-size="pageSize"
:total="total"
@current-change="handleCurrentChange"
v-model:current-page="page"
:page-size="pageSize"
:total="total"
></Pagination>
<!-- 添加配送员弹框 -->
<el-dialog
......@@ -127,7 +127,7 @@
<el-dialog
title="分配配送员"
v-model="dialogFormAssign"
width="70%"
width="70%"
:show-close="false"
>
<el-form class="dioFor">
......@@ -138,7 +138,12 @@
clearable
filterable
>
<el-option :label="item.label" :value="item.value" v-for="item in marketingList" :key="item.value"></el-option>
<el-option
:label="item.label"
:value="item.value"
v-for="item in marketingList"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
<span class="dioFor">已选:{{ multipleSelection.length }}人</span>
......@@ -153,11 +158,7 @@
style="width: 100%"
@selection-change="selectGoodsChange"
>
<el-table-column
width="60"
align="center"
type="selection"
>
<el-table-column width="60" align="center" type="selection">
</el-table-column>
<el-table-column
align="center"
......@@ -183,9 +184,9 @@
prop="deliverer_tool_type"
label="配送工具"
>
<template #default="scope">
{{scope.row.deliverer_tool_type==0 ? "电动车" : "摩托车"}}
</template>
<template #default="scope">
{{ scope.row.deliverer_tool_type == 0 ? "电动车" : "摩托车" }}
</template>
</el-table-column>
</el-table>
</el-form>
......@@ -207,14 +208,14 @@ import {
getList,
getSaveDeliverer,
getAddDeliverer,
getMarketingList
newGetMarketingList,
} from "../../../service/Groupmeal/groupmeal";
import { ElMessage } from "element-plus";
export default {
name: "Distrib",
components: {
Layout,
Pagination
Pagination,
},
data() {
return {
......@@ -247,13 +248,13 @@ export default {
page: 1,
pageSize: 20,
isEdit: false,
marketingList:[]
marketingList: [],
};
},
created() {
this.getList();
this.getDelivererList();
this.getMarketingList()
this.newGetMarketingList();
},
methods: {
selectGoodsChange(val) {
......@@ -273,17 +274,17 @@ export default {
min_capacity: "", //最小配送量
tool_type: [], //配送工具
}),
this.deliverer= [],
this.multipleSelection = [];
(this.deliverer = []),
(this.multipleSelection = []);
this.selectActivity = ""; //活动下拉框
},
// 获取主页列表
async getList() {
const {page, pageSize} = this
const params={
const { page, pageSize } = this;
const params = {
page,
pageSize
}
pageSize,
};
try {
const res = await getList(params);
this.distribList = res.response.list;
......@@ -297,7 +298,8 @@ export default {
const { name, max_capacity, min_capacity, tool_type } = this.addDeliverer;
if (!name) return ElMessage("请填写配送员姓名");
if (!max_capacity) return ElMessage("请填写配送上限");
if (min_capacity !== '' && min_capacity <= 0) return ElMessage("最小配送量不能为0或小于0");
if (min_capacity !== "" && min_capacity <= 0)
return ElMessage("最小配送量不能为0或小于0");
if (!min_capacity) return ElMessage("请填写最小配送量");
if (!tool_type) return ElMessage("请选择配送工具");
const params = {
......@@ -307,8 +309,8 @@ export default {
tool_type: +tool_type,
};
try {
const {code, reason} = await getAddDeliverer(params);
if(code !== 0) return this.$message.error(reason || "添加配送员失败")
const { code, reason } = await getAddDeliverer(params);
if (code !== 0) return this.$message.error(reason || "添加配送员失败");
ElMessage("添加配送员成功");
this.getDelivererList();
this.dialogFormAdd = false;
......@@ -323,17 +325,17 @@ export default {
}
},
// 添加的取消
addCancel(){
this.dialogFormAdd = false
this.resetDate()
addCancel() {
this.dialogFormAdd = false;
this.resetDate();
},
// 分配配送员
assignDeliverer() {
this.dialogFormAssign = true;
this.getDelivererList();
this.multipleSelection = [];
this.deliverer = []
this.isEdit = false
this.deliverer = [];
this.isEdit = false;
},
// 修改
async handleModify(row) {
......@@ -360,8 +362,16 @@ export default {
},
// 下载路线
handleDownload(url) {
url && window.open("http://bp-dev.ini.yidian-inc.com" + url)
console.log(url)
// url && window.open("http://bp-dev.ini.yidian-inc.com" + url);
var ENV;
if (process.env.NODE_ENV == "development") {
ENV = "http://bp-dev.ini.yidian-inc.com/";
} else if (process.env.NODE_ENV == "test") {
ENV = "http://bp-test.ini.yidian-inc.com/";
} else {
ENV = "http://bp.ini.yidian-inc.com/";
}
url && window.open(ENV + url);
},
// 分配保存
async save() {
......@@ -369,8 +379,15 @@ export default {
const uids = multipleSelection.map((item) => item.deliverer_id);
if (!selectActivity) return ElMessage("请选择活动姓名");
try {
await getSaveDeliverer({ code: selectActivity, uids: uids.join(",") });
ElMessage("分配配送员成功");
const { code, reason } = await getSaveDeliverer({
code: selectActivity,
uids: uids.join(","),
});
if (code !== 0)
return this.$message.error(
reason || (this.isEdit ? "修改配送员失败" : "分配配送员失败")
);
ElMessage(this.isEdit ? "修改配送员成功" : "分配配送员成功");
this.dialogFormAssign = false;
this.isEdit = false;
this.getList();
......@@ -380,23 +397,23 @@ export default {
}
},
// 分配取消
assignCancel(){
this.dialogFormAssign = false
this.getDelivererList()
this.resetDate()
assignCancel() {
this.dialogFormAssign = false;
this.getDelivererList();
this.resetDate();
},
// 活动名称列表
async getMarketingList() {
async newGetMarketingList() {
try {
const res = await getMarketingList();
this.marketingList = res.result.map(item => {
const res = await newGetMarketingList();
this.marketingList = res.result.map((item) => {
return {
value: item.marketing_id,
label: item.marketing_name
}
})
label: item.marketing_name,
};
});
} catch (error) {
console.log(error)
console.log(error);
}
},
// 分配配送员列表
......
const headerConfig = [
{
name: "活动管理",
path: "/op/activity/manage"
},
{
name: "订单管理",
path: "/op/groupmeal/orderManagement"
},
{
path: '/op/groupmeal/distrib',
name: '配送员管理'
name: "新订单管理",
path: "/op/groupmeal/newOrderManagement"
},
{
path: "/op/groupmeal/distrib",
name: "配送员管理"
}
];
export default headerConfig;
\ No newline at end of file
export default headerConfig;
......@@ -7,14 +7,13 @@
<div class="main">
<slot></slot>
</div>
</div>
</template>
<script>
import PageHeader from '../components/PageHeader';
import PageHeader from "../components/PageHeader";
export default {
components: { PageHeader },
components: { PageHeader }
};
</script>
......
This diff is collapsed.
......@@ -15,9 +15,3 @@
display: block;
text-align: center;
}
.refundCon /deep/ .el-row {
margin-bottom: 15px;
display: flex;
align-items: center;
}
\ No newline at end of file
......@@ -513,20 +513,20 @@ export default {
marketing_id: val,
};
const res = await getGoodsList(params); // 商品名称
this.getSubShopListMet(val) //自提点
this.getSubShopListMet(val); //自提点
// const res = await getSubShopList(params);
this.tradeNameArr = res.result;
// this.selLiftPoinArr = res.result;
// this.selLiftPoinArr = res.result;
},
// 获取自提点
async getSubShopListMet(params) {
try {
let marketing_id = ''
if(params){
marketing_id = params
let marketing_id = "";
if (params) {
marketing_id = params;
}
const res = await getSubShopList({'marketing_id':marketing_id});
const res = await getSubShopList({ marketing_id: marketing_id });
this.selLiftPoinArr = res.result;
} catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~");
......@@ -758,19 +758,23 @@ export default {
},
created() {
this.getMarketingListMet(); // 活动名称
this.getSubShopListMet(); // 自提点
this.getOrderListMet(); // table列表
this.getSubShopListMet(); // 自提点
this.getOrderListMet(); // table列表
},
};
</script>
<style lang="less" src="./index.less" scope></style>
<style lang="less" scoped>
.check-wrap{
/deep/ .el-checkbox__label {
white-space: normal;
word-break: break-all;
.check-wrap {
/deep/ .el-checkbox__label {
white-space: normal;
word-break: break-all;
}
}
.refundCon /deep/ .el-row{
margin-bottom: 15px;
display: flex;
align-items: center;
}
</style>
<template>
<layout>
<RoleList appId="merchant-op" detailPath="/op/roleRoleDetail"></RoleList>
<RoleList detailPath="/op/roleRoleDetail"></RoleList>
</layout>
</template>
<script>
......
<template>
<layout>
<UserList appId="merchant-op" />
<UserList />
</layout>
</template>
......
......@@ -3,7 +3,12 @@
<!-- <auditTab v-if="status_text == 'fourth'"></auditTab> -->
<!-- <el-card class="goods-h5"> -->
<div class="goods-h5">
<el-table :data="goodsList" border>
<el-table :data="goodsList" border max-height="700">
<el-table-column
label="登录地点"
prop="withdraw_address"
align="center"
></el-table-column>
<el-table-column
label="申请用户"
prop="user_id"
......@@ -33,7 +38,7 @@
</el-table>
<!-- 页码区 -->
<!-- <el-pagination
<el-pagination
class="pagination"
@current-change="handleCurrentChange"
v-model:currentPage="searchProps.page"
......@@ -41,7 +46,7 @@
layout="total,prev, pager, next, jumper"
:total="searchProps.count"
>
</el-pagination> -->
</el-pagination>
</div>
<!-- </el-card> -->
</template>
......
.tab-show {
width: 100%;
height: 100%;
// height: 100%;
padding: 0px 55px;
background-color: white;
.el-tabs__nav-wrap::after {
......@@ -105,6 +105,6 @@
}
.el-message-box {
width: 80vw;
width: 20vw;
margin: 0 auto;
}
\ No newline at end of file
......@@ -62,6 +62,11 @@
prop="city_name"
align="center"
></el-table-column>
<el-table-column
label="登录地点"
prop="withdraw_address"
align="center"
></el-table-column>
<el-table-column
label="提现金额"
prop="amount"
......@@ -190,6 +195,10 @@
>白名单</el-button
> -->
<ul class="listShow">
<li>
<span class="list-left">登录地点 :</span>
<span class="list-right">{{ dialogData.showData.withdraw_address }}</span>
</li>
<li>
<span class="list-left">提现金额 :</span>
<span class="list-right">{{ dialogData.showData.amount }}</span>
......
......@@ -2,6 +2,7 @@
<div class="goods-h5">
<el-form>
<ul class="apply-list">
<li><span>登录地点:</span><span>{{ dialogData.showData.withdraw_address }}</span></li>
<li> 提现用户:<span>{{ dialogData.showData.user_id }}</span></li>
<li> 提现金额:<span>{{ dialogData.showData.amount }}</span></li>
<li> 最近24小时收入:<span>{{ dialogData.showData.lately_amount }}</span></li>
......
......@@ -3,6 +3,10 @@ const headerConfig = [
name: "提现审核",
path: "/op/withdrawal/examine"
},
{
name: "钱包账户",
path: "/op/withdrawal/walletaccount"
},
{
path: "/op/withdrawal/roleManageRole",
name: "角色管理",
......
<template>
<div
class="manage-wrapper"
v-loading="tableLoading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.6)"
>
<el-card class="role_management">
<!-- 检索区域 -->
<div class="creatRole">
<el-form>
<el-form-item label="用户Id">
<span>{{ user_id }}</span>
</el-form-item>
<el-form-item label="交易类型">
<el-select v-model="type" clearable @change="getRecordList">
<el-option label="充值" :value="1"></el-option>
<el-option label="提现" :value="2"></el-option>
<el-option label="转账" :value="3"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<!-- 用户搜索列表 -->
<el-table border :data="recordList">
<el-table-column
label="流水号"
width="200px"
prop="wallet_record_id"
align="center"
></el-table-column>
<el-table-column
label="更新时间"
prop="create_time"
align="center"
></el-table-column>
<el-table-column
label="金额"
prop="amount"
align="center"
></el-table-column>
<el-table-column label="可用余额" prop="balance" align="center">
<template #default="scope">
{{ "¥ " + scope.row.balance }}
</template>
</el-table-column>
<el-table-column label="交易类型" prop="trade_type" align="center">
<template #default="scope">
{{ getTradeType(scope.row.trade_type) }}
</template>
</el-table-column>
<el-table-column
label="状态"
width="200px"
prop="status"
align="center"
>
<template #default="scope">
<span
:style="{ color: scope.row.status === '失败' ? 'red' : 'black' }"
>
{{ scope.row.status }}
</span>
</template>
</el-table-column>
<el-table-column label="说明" align="center" prop="third_order_desc">
</el-table-column>
</el-table>
<el-button
type="primary"
@click="handleBack"
style="margin-top: 50px; margin-left: 45%"
>返回</el-button
>
<!-- <page :totalNum="totalNum" @update="update" /> -->
<el-pagination
:class="totalNum/params.page_size>=7? 'page': ''"
@current-change="handleCurrentChange"
v-model:currentPage="params.page"
:page-size="params.page_size"
layout="total, prev, pager, next"
:total="totalNum"
>
</el-pagination>
</el-card>
</div>
</template>
<script>
// import page from "../../../components/Pagination";
import { getRecordList } from "@/service/Withdrawal/withdrawal";
import { ElMessage } from "element-plus";
const tradeType = { 1: "充值", 2: "提现", 3: "转账" };
export default {
name: "flowRecord",
// components: { page },
data() {
return {
user_id: "",
wallet_id: "",
type: "",
recordList: [
{
wallet_record_id: "243435676",
create_time: "2021-3-3",
amount: 4,
balance: 555,
trade_type: "提现",
status: "失败"
}
],
tableLoading: false,
params: {
page: 1,
currentPage: 1,
page_size: 20
},
totalNum: null
};
},
created() {
this.user_id = this.$route.query.user_id;
this.wallet_id = this.$route.query.wallet_id;
this.tableLoading = true;
this.getRecordList();
},
methods: {
// update(obj) {
// Object.assign(this.params, obj);
// this.getRecordList();
// },
// 分页
handleCurrentChange(e) {
this.params.page = e;
this.getRecordList();
this.tableLoading = true;
},
//获取账户流水列表
getRecordList() {
this.recordList = [];
let { page, page_size } = this.params;
let { wallet_id, type } = this;
let params_list = {
wallet_id,
page,
page_size,
type
};
getRecordList(params_list)
.then((res) => {
this.tableLoading = true;
this.recordList = res.result.list;
this.totalNum = res.result.count;
this.tableLoading = false;
})
.catch((err) => {
this.tableLoading = false;
ElMessage.error("加载失败" + err);
});
},
// 获取交易类型
getTradeType(code) {
return tradeType[code];
},
// 返回
handleBack() {
this.$router.back();
},
},
};
</script>
<style lang="less" scoped>
.creatRole {
display: flex;
justify-content: space-between;
}
.role_management {
padding: 20px;
}
.page {
/deep/ .el-pager>li:last-of-type {
display: none;
}
}
</style>
\ No newline at end of file
<template>
<Layout>
<div
class="manage-wrapper"
v-loading="tableLoading"
element-loading-text="拼命加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.6)"
>
<el-card class="role_management">
<!-- 检索区域 -->
<div class="creatRole">
<el-form inline :model="searchProps">
<el-form-item label="用户Id">
<el-input
clearable
v-model="searchProps.user_id"
@input="
searchProps.user_id = $event.replace(
/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g,
''
)
"
></el-input>
</el-form-item>
<el-form-item label="账户状态">
<el-select v-model="searchProps.type" clearable>
<el-option label="黑名单" :value="2"></el-option>
<el-option label="正常用户" :value="1"></el-option>
</el-select>
</el-form-item>
<el-button
type="primary"
style="margin-left: 30px; margin-bottom: 22px"
@click="findProducts"
>查询</el-button
>
</el-form>
</div>
<!-- 用户搜索列表 -->
<el-table border :data="accountList">
<el-table-column
label="用户id"
prop="user_id"
align="center"
></el-table-column>
<el-table-column
label="账户可用金额"
prop="available_fund"
align="center"
>
<template #default="scope">
{{ "¥ " + scope.row.available_fund }}
</template>
</el-table-column>
<el-table-column
label="账户冻结金额"
prop="freezing_fund"
align="center"
>
<template #default="scope">
{{ "¥ " + scope.row.freezing_fund }}
</template>
</el-table-column>
<el-table-column
label="历史提现金额"
prop="history_fund"
align="center"
>
<template #default="scope">
{{ "¥ " + scope.row.history_fund }}
</template>
</el-table-column>
<el-table-column
label="账户状态"
width="200px"
prop="status"
align="center"
>
</el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
v-show="scope.row.is_black == 0"
@click.stop="
openBounced(
scope.row.is_black,
scope.row.user_id,
scope.row.wallet_id
)
"
type="text"
size="mini"
>黑名单</el-button
>
<el-button
v-show="scope.row.is_black == 1"
@click.stop="
openBounced(
scope.row.is_black,
scope.row.user_id,
scope.row.wallet_id
)
"
size="mini"
type="text"
>释放</el-button
>
<el-button
@click.stop="handelRecord(scope.row)"
size="mini"
type="text"
>流水记录</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<!-- <page :totalNum="totalNum" @update="update" ref="params" /> -->
<el-pagination
:class="totalNum/params.page_size>=7? 'page': ''"
@current-change="handleCurrentChange"
v-model:currentPage="params.page"
:page-size="params.page_size"
layout="total, prev, pager, next"
:total="totalNum"
>
</el-pagination>
</el-card>
</div>
</Layout>
</template>
<script>
// import page from "../../../components/Pagination";
import Layout from "../layout/index.vue";
import {
getAccountList,
getAccountBlackList,
getReblackList,
} from "@/service/Withdrawal/withdrawal";
import { ElMessage } from "element-plus";
export default {
name: "walletAccount",
props: ["flowRecord"],
components: {
// page,
Layout,
},
data() {
return {
searchProps: {
user_id: "",
wallet_id: "",
type: "",
},
params: {
page: 1,
page_size: 20,
currentPage: 1,
},
totalNum: null,
dialogText: "",
accountList: [],
tableLoading: false,
};
},
created() {
this.tableLoading = true;
this.getAccountList();
// this.getPermissionsAll();
},
methods: {
//获取账户列表
getAccountList() {
this.accountList = [];
let { page, page_size } = this.params;
let { user_id, type } = this.searchProps;
let params_list = {
page,
page_size,
type,
user_id: user_id || undefined,
};
getAccountList(params_list)
.then((res) => {
this.tableLoading = true;
this.accountList = res.result.list;
this.totalNum = res.result.count;
this.tableLoading = false;
})
.catch((err) => {
this.tableLoading = false;
ElMessage.error("加载失败" + err);
});
},
//查询
findProducts() {
this.tableLoading = true;
this.params.page = 1;
// this.$refs.params.currentPage = 1;
this.getAccountList();
},
//列表分页
// update(obj) {
// Object.assign(this.params, obj);
// let { page, page_size } = this.params;
// this.getAccountList(page, page_size);
// this.params.page = 1;
// this.tableLoading = true;
// console.log(obj);
// },
// 分页
handleCurrentChange(e) {
this.params.page = e;
this.getAccountList();
this.tableLoading = true;
},
//弹框提示
openBounced(type, user_id, wallet_id) {
this.$confirm(
`${
type === 1 ? "确认后则将用户释放出黑名单" : "确认后则将用户拉入黑名单"
}是否继续?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
}
)
.then(() => {
if (+type === 0) {
this.handleBlackList(user_id, wallet_id);
} else {
this.release(user_id, wallet_id);
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
//释放
async release(user_id, wallet_id) {
this.dialogText = "确认后则将用户释放出黑名单";
this.tableLoading = true;
let params = {
user_id,
wallet_id,
};
try {
await getReblackList(params);
ElMessage("释放成功");
this.getAccountList();
} catch (error) {
ElMessage("释放请求失败");
}
},
//流水记录
handelRecord(row) {
this.$router.push({
path: "/op/withdrawal/flowrecord",
query: { user_id: row.user_id, wallet_id: row.wallet_id },
});
},
//黑名单
async handleBlackList(user_id, wallet_id) {
this.tableLoading = true;
let params = {
user_id,
wallet_id,
};
try {
await getAccountBlackList(params);
ElMessage("添加黑名单成功");
this.getAccountList();
} catch (error) {
ElMessage("添加黑名单失败");
}
},
},
};
</script>
<style lang="less" scoped>
.manage-wrapper {
height: 100vh;
}
.creatRole {
display: flex;
justify-content: space-between;
}
.role_management {
padding: 20px;
}
.role_management .el-button {
margin: 0 2px;
}
.page {
/deep/ .el-pager>li:last-of-type {
display: none;
}
}
</style>
......@@ -8,6 +8,12 @@
// redirect: "/op/groupmeal/orderManagement",
component: () => import(/* webpackChunkName: "goods" */ "@/pages/Groupmeal/orderManagement")
},
{
path: "/op/groupmeal/newOrderManagement",
name: "newOrderManagement",
// redirect: "/op/groupmeal/orderManagement",
component: () => import(/* webpackChunkName: "goods" */ "@/pages/Groupmeal/newOrderManagement")
},
{
path: "/op/groupmeal/distrib",
name: "Distrib",
......
......@@ -10,6 +10,19 @@ const withdrawalRoutes = [
component: () =>
import(/* webpackChunkName: "Withdrawal" */ "@/pages/Withdrawal/Examine")
},
// 钱包账户
{
path: "/op/withdrawal/walletaccount",
name: "walletAccount",
component: () =>
import(/* webpackChunkName: "Withdrawal" */ "@/pages/Withdrawal/walletAccount")
},
{
path: "/op/withdrawal/flowrecord",
name: "flowRecord",
component: () =>
import(/* webpackChunkName: "Withdrawal" */ "@/pages/Withdrawal/walletAccount/flowRecord")
},
//用户管理
{
path: "/op/withdrawal/user",
......
......@@ -105,11 +105,10 @@ const routes = [
// 团餐运营
...groupmealRouters
];
console.log(routes);
const router = createRouter({
history: createWebHistory(),
routes
});
export default router;
\ No newline at end of file
export default router;
......@@ -32,7 +32,7 @@ export async function markGoodsInfo(params) {
// 编辑商品详情
export async function editGoods(params) {
const res = await axios.post("/api/v1/goods/background/edit_goods", params);
const res = await axios.post("/api/v1/goods/background/edit_activity_goods", params);
return res;
}
......@@ -82,7 +82,7 @@ class ActivityService {
// 关闭/开启 活动
static async updateActivity(query) {
const res = await axios.post(
"/api/v1/marketing/background/update_marketing",
"/api/v1/marketing/background/update_marketing_online_status",
{
...query
}
......
......@@ -27,9 +27,11 @@ export async function getSaveDeliverer(params) {
return res;
}
// 老订单管理
// 获取订单列表
export async function getOrderList(params) {
const res = await axios.get("/api/v1/order/background/order_list", {
const res = await axios.get("/api/v1/order/oldbackground/order_list", {
params
});
return res;
......@@ -37,13 +39,13 @@ export async function getOrderList(params) {
// 获取活动名称
export async function getMarketingList() {
const res = await axios.get("/api/v1/order/background/marketing_list");
const res = await axios.get("/api/v1/order/oldbackground/marketing_list");
return res;
}
// 获取商品名称
export async function getGoodsList(params) {
const res = await axios.get("/api/v1/order/background/goods_list", {
const res = await axios.get("/api/v1/order/oldbackground/goods_list", {
params
});
return res;
......@@ -51,7 +53,7 @@ export async function getGoodsList(params) {
// 获取自提点
export async function getSubShopList(params) {
const res = await axios.get("/api/v1/order/background/sub_shop_list",{
const res = await axios.get("/api/v1/order/oldbackground/sub_shop_list",{
params
});
return res;
......@@ -59,7 +61,7 @@ export async function getSubShopList(params) {
// 导出订单
export async function orderExport(params) {
const res = await axios.get("/api/v1/order/background/order_export", {
const res = await axios.get("/api/v1/order/oldbackground/order_export", {
params
});
return res;
......@@ -67,7 +69,7 @@ export async function orderExport(params) {
// 打印订单
export async function orderPrint(params) {
const res = await axios.get("/api/v1/order/background/order_print", {
const res = await axios.get("/api/v1/order/oldbackground/order_print", {
params
});
return res;
......@@ -75,7 +77,7 @@ export async function orderPrint(params) {
// 订单退款列表
export async function orderItemList(params) {
const res = await axios.get("/api/v1/order/background/order_item_list", {
const res = await axios.get("/api/v1/order/oldbackground/order_item_list", {
params
});
return res;
......@@ -87,7 +89,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// order_id: orderId,
// refund_list: itemsToRefund
// };
const res = await axios.post("/api/v1/order/background/order_refund", {
const res = await axios.post("/api/v1/order/oldbackground/order_refund", {
order_id: orderId,
refund_list: itemsToRefund
});
......@@ -96,7 +98,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// 订单驳回
export async function orderRefundReject(params) {
const res = await axios.get("/api/v1/order/background/order_refund_reject", {
const res = await axios.get("/api/v1/order/oldbackground/order_refund_reject", {
params
});
return res;
......@@ -107,8 +109,88 @@ export function getOrderExportURL(eventId, type) {
var ENV;
if(process.env.NODE_ENV == "development"){
ENV = "http://bp-dev.ini.yidian-inc.com/"
}else if(process.env.NODE_ENV == "test"){
ENV = "http://bp-test.ini.yidian-inc.com/"
}else{
ENV = "http://bp.ini.yidian-inc.com/"
}
return `${ENV}order/oldbackground/order_export?marketing_id=${eventId}&type=${type}`;
}
// 新订单管理
// 获取订单列表
export async function newGetOrderList(params) {
const res = await axios.get("/api/v1/order/background/order_list", {
params
});
return res;
}
// 获取活动名称
export async function newGetMarketingList() {
const res = await axios.get("/api/v1/order/background/order_condition_marketing_list");
return res;
}
// 获取商品名称
export async function newGetGoodsList(params) {
const res = await axios.get("/api/v1/order/background/order_condition_goods_list", {
params
});
return res;
}
// 获取自提点
export async function newGetSubShopList(params) {
const res = await axios.get("/api/v1/order/background/order_condition_take_place_list",{
params
});
return res;
}
// 打印订单
export async function newOrderPrint(params) {
const res = await axios.get("/api/v1/order/background/order_print", {
params
});
return res;
}
// 订单退款列表
export async function newOrderItemList(params) {
const res = await axios.get("/api/v1/order/background/order_item_list", {
params
});
return res;
}
// 订单退款
export async function newRefundOrder(orderId, itemsToRefund) {
const res = await axios.post("/api/v1/order/background/order_refund", {
order_id: orderId,
refund_list: itemsToRefund
});
return res;
}
// 订单驳回
export async function newOrderRefundReject(params) {
const res = await axios.get("/api/v1/order/background/order_refund_reject", {
params
});
return res;
}
// 导出订单
export function newGetOrderExportURL(eventId, type) {
var ENV;
if(process.env.NODE_ENV == "development"){
ENV = "http://bp-dev.ini.yidian-inc.com/"
}else if(process.env.NODE_ENV == "test"){
ENV = "http://bp-test.ini.yidian-inc.com/"
}else{
ENV = "http://bp.ini.yidian-inc.com/"
}
return `${ENV}order/background/order_export?marketing_id=${eventId}&type=${type}`;
}
......@@ -47,3 +47,24 @@ export async function getRolesForUser(user_email) {
);
return res.permissions;
}
// 迭代---钱包账户
// 获取账户列表
export async function getAccountList(params) {
const res = await axios.get("/api/v1/get_account_list", {params});
return res;
}
// 获取账户流水列表
export async function getRecordList(params) {
const res = await axios.get("/api/v1/get_record_list",{params});
return res;
}
// 钱包账户-黑名单
export async function getAccountBlackList(params) {
const res = await axios.post("/api/v1/get_account_black_list", params)
return res;
}
// 钱包账户-释放
export async function getReblackList(params) {
const res = await axios.post("/api/v1/get_reblack_list",params)
return res;
}
\ No newline at end of file
......@@ -25,8 +25,6 @@ export default createStore({
actions: {
async updateUserPermission({ commit }, payload) {
const { permissions = [] } = await getPermissions(payload.email);
console.log("VUEX action updateUserPermission::", permissions);
commit("updateUserPermission", permissions);
},
async fetchPermission({ commit }, { email, appId }) {
......
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