Commit b94c0525 authored by lihui's avatar lihui

fix: 图片展示 上传

parent 49660a39
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/marketing_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取商品名称
exports.newGetGoodsList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/goods_list`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 获取自提点
exports.newGetSubShopList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/sub_shop_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,
......
......@@ -90,17 +90,27 @@ router.post(`${API_VERSION}/order/deliverer/list_day_deliverer`, groupmeal.getDe
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);
// 老订单管理
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/marketing_list`, groupmeal.newGetMarketingList);
router.get(`${API_VERSION}/order/background/goods_list`, groupmeal.newGetGoodsList);
router.get(`${API_VERSION}/order/background/sub_shop_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);
// 钱包提现审核 wallet/background/apply_detail
router.get(`${API_VERSION}/get_withdrawal_apply_list`, withdrawal.getApplyList)
......
......@@ -6,6 +6,7 @@
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">
......@@ -34,8 +35,10 @@
</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 }}
......@@ -225,9 +229,6 @@ export default {
.infoItemText {
font-weight: bolder;
}
// display: flex;
// align-items: center;
// justify-content: center;
}
}
.activityDetail {
......
......@@ -43,9 +43,9 @@
import { GOODS_URI } from "../../../../../server/config";
export default {
props: {
editInfo: {
infoEditArr: {
type: Object,
required: () => {}
defult: () => {}
}
},
data() {
......@@ -63,6 +63,25 @@ export default {
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload` // 金山云上传地址
};
},
watch: {
infoEditArr: {
// 监听props属性 展示自提点列表
handler: async 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]
});
}
}
},
deep: true
// immediate: true
}
},
methods: {
// 展示商品大图
previewImage(file) {
......@@ -101,7 +120,7 @@ export default {
}
},
created() {
this.marketingInfoMet();
// this.marketingInfoMet();
}
};
</script>
......
......@@ -16,7 +16,7 @@
<infoEditing
ref="infoEdit"
v-show="active === 1"
:editInfo="infoEditArr"
:infoEditArr="infoEditArr"
/>
<addProduc
ref="addProduc"
......@@ -102,10 +102,7 @@ export default {
}
this.addProducArr = this.$refs.addProduc.comTableData;
this.active = 3;
} else {
console.log();
}
// this.active++;
},
// 获取营销活动详情
......@@ -150,7 +147,9 @@ export default {
op_cur_user: store.state.userInfo.email,
start_time: this.startDate,
end_time: this.endDate,
pindan_pic: this.$refs.infoEdit.infoEditForm.picUploadList.join(","),
pindan_pic: this.infoEditArr.pindan_pic_url
.concat(this.$refs.infoEdit.infoEditForm.picUploadList)
.join(","),
pindan_desc: this.$refs.infoEdit.infoEditForm.desc,
take_place_ids: this.takePlaceIDArr
};
......
......@@ -3,6 +3,10 @@ const headerConfig = [
name: "订单管理",
path: "/op/groupmeal/orderManagement"
},
{
name: "新订单管理",
path: "/op/groupmeal/newOrderManagement"
},
{
path: '/op/groupmeal/distrib',
name: '配送员管理'
......
This diff is collapsed.
......@@ -630,6 +630,9 @@ export default {
// 获取订单列表
async getOrderListMet() {
if(this.$route.query.marketing_type == "4"){
this.orderQueryObj.marketing_id = this.$route.query.marketing_id;
}
try {
const res = await getOrderList(this.orderQueryObj);
this.goodsNum = res.goods_num; // 商品共计
......
......@@ -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",
......
......@@ -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;
......@@ -104,6 +106,94 @@ export async function orderRefundReject(params) {
// 导出订单
export function getOrderExportURL(eventId, type) {
var ENV;
if(process.env.NODE_ENV == "development"){
ENV = "http://bp-dev.ini.yidian-inc.com/"
}else{
ENV = "http://bp-test.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/marketing_list");
return res;
}
// 获取商品名称
export async function newGetGoodsList(params) {
const res = await axios.get("/api/v1/order/background/goods_list", {
params
});
return res;
}
// 获取自提点
export async function newGetSubShopList(params) {
const res = await axios.get("/api/v1/order/background/sub_shop_list",{
params
});
return res;
}
// 导出订单
export async function newOrderExport(params) {
const res = await axios.get("/api/v1/order/background/order_export", {
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 params = {
// order_id: orderId,
// refund_list: 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/"
......
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