Commit 1472c5c9 authored by lihui's avatar lihui

feat:mearge

parents 3f670438 bdacb43f
...@@ -140,7 +140,7 @@ exports.orderRefundReject = async ctx => { ...@@ -140,7 +140,7 @@ exports.orderRefundReject = async ctx => {
// 获取订单管理列表 // 获取订单管理列表
exports.newGetOrderList = async ctx => { exports.newGetOrderList = async ctx => {
const url = `${GROUPMEAL_URI}/order/oldbackground/op_order_list`; const url = `${GROUPMEAL_URI}/order/background/op_order_list`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
......
...@@ -102,7 +102,7 @@ router.get(`${API_VERSION}/order/oldbackground/order_refund_reject`, groupmeal.o ...@@ -102,7 +102,7 @@ router.get(`${API_VERSION}/order/oldbackground/order_refund_reject`, groupmeal.o
router.post(`${API_VERSION}/order/oldbackground/order_refund`, groupmeal.orderRefund); router.post(`${API_VERSION}/order/oldbackground/order_refund`, groupmeal.orderRefund);
// 新订单管理 // 新订单管理
router.get(`${API_VERSION}/order/oldbackground/op_order_list`, groupmeal.newGetOrderList); router.get(`${API_VERSION}/order/background/op_order_list`, groupmeal.newGetOrderList);
router.get(`${API_VERSION}/order/background/marketing_list`, groupmeal.newGetMarketingList); 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/goods_list`, groupmeal.newGetGoodsList);
router.get(`${API_VERSION}/order/background/sub_shop_list`, groupmeal.newGetSubShopList); router.get(`${API_VERSION}/order/background/sub_shop_list`, groupmeal.newGetSubShopList);
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-table-column prop="total_amount_sold" label="已售数量"> <el-table-column prop="total_amount_sold" label="已售数量">
</el-table-column> </el-table-column>
<el-table-column prop="inventory_rest" label="剩余库存"></el-table-column> <el-table-column prop="inventory_rest" label="剩余库存"></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" width="120">
<template #default="scope"> <template #default="scope">
<el-button <el-button
type="text" type="text"
...@@ -65,15 +65,17 @@ ...@@ -65,15 +65,17 @@
> >
<el-form-item label="图片:"> <el-form-item label="图片:">
<el-upload <el-upload
:class="{hide:hideUpload}"
:data="{ type: 1 }" :data="{ type: 1 }"
:action="uploadUrl" :action="uploadUrl"
:on-preview="previewImage" :on-preview="previewImage"
:on-success="handleDetailSuccess" :on-success="handleDetailSuccess"
:on-change = "handleDetailChange"
:before-remove="removeDetailFiles" :before-remove="removeDetailFiles"
:file-list="picUrlList" :file-list="picUrlList"
auto-upload auto-upload
ref="picUpload" ref="picUpload"
:limit="1" :limit="limitCount"
list-type="picture-card" list-type="picture-card"
multiple multiple
> >
...@@ -181,7 +183,7 @@ ...@@ -181,7 +183,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<span class="dioFor">已选:{{ multipleSelection.length }}</span> <span class="dioFor">已选:{{ multipleSelection.length }}</span>
<el-table <el-table
:data="comLibTableData" :data="comLibTableData"
class="comLibTableData" class="comLibTableData"
...@@ -279,6 +281,8 @@ export default { ...@@ -279,6 +281,8 @@ export default {
picUploadList: [], // 上传详情图片列表 picUploadList: [], // 上传详情图片列表
isShowPopver: false, // 是否展示图片框 isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址 uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
hideUpload: false,
limitCount:"1",
// 商品库添加 // 商品库添加
selCommodityPopup: false, // 商品库添加弹窗状态 selCommodityPopup: false, // 商品库添加弹窗状态
...@@ -330,6 +334,10 @@ export default { ...@@ -330,6 +334,10 @@ export default {
this.isShowPopver = true; this.isShowPopver = true;
}, },
handleDetailChange(){
this.hideUpload = this.picUploadList.length >= this.limitCount;
},
// 图片上传成功时 // 图片上传成功时
handleDetailSuccess(res) { handleDetailSuccess(res) {
this.picUploadList.push(res.result.image_id); this.picUploadList.push(res.result.image_id);
...@@ -342,6 +350,7 @@ export default { ...@@ -342,6 +350,7 @@ export default {
this.picUploadList.splice(i, 1); this.picUploadList.splice(i, 1);
} }
} }
this.hideUpload = this.picUploadList.length >= this.limitCount;
}, },
// 获取商家 // 获取商家
...@@ -406,7 +415,7 @@ export default { ...@@ -406,7 +415,7 @@ export default {
this.comTableData.push(this.comLibTableData[j]); this.comTableData.push(this.comLibTableData[j]);
} }
} }
},500); }, 500);
this.addCommodityPopup = false; this.addCommodityPopup = false;
} else { } else {
ElMessage.error(res.reason); ElMessage.error(res.reason);
...@@ -519,6 +528,7 @@ export default { ...@@ -519,6 +528,7 @@ export default {
} }
}); });
}); });
ElMessage.error("商品添加重复,已过滤掉重复选项");
} }
}, },
...@@ -578,4 +588,8 @@ export default { ...@@ -578,4 +588,8 @@ export default {
.price /deep/ .el-input__inner { .price /deep/ .el-input__inner {
text-align: left; text-align: left;
} }
.hide /deep/ .el-upload--picture-card {
display: none;
}
</style> </style>
\ No newline at end of file
...@@ -14,15 +14,17 @@ ...@@ -14,15 +14,17 @@
</el-form-item> </el-form-item>
<el-form-item label="图片:"> <el-form-item label="图片:">
<el-upload <el-upload
:class="{ hide: hideUpload }"
:data="{ type: 1 }" :data="{ type: 1 }"
:action="uploadUrl" :action="uploadUrl"
:on-preview="previewImage" :on-preview="previewImage"
:on-success="handleDetailSuccess" :on-success="handleDetailSuccess"
:on-change="handleDetailChange"
:before-remove="removeDetailFiles" :before-remove="removeDetailFiles"
:file-list="infoEditForm.picUrlList" :file-list="infoEditForm.picUrlList"
auto-upload auto-upload
ref="picUpload" ref="picUpload"
:limit="9" :limit="limitCount"
list-type="picture-card" list-type="picture-card"
multiple multiple
> >
...@@ -64,7 +66,9 @@ export default { ...@@ -64,7 +66,9 @@ export default {
}, },
propData: {}, propData: {},
isShowPopver: false, // 是否展示图片框 isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload` // 金山云上传地址 uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
hideUpload: false,
limitCount: "9"
}; };
}, },
watch: { watch: {
...@@ -98,6 +102,11 @@ export default { ...@@ -98,6 +102,11 @@ export default {
this.isShowPopver = true; this.isShowPopver = true;
}, },
handleDetailChange() {
this.hideUpload =
this.infoEditForm.picUploadList.length >= this.limitCount;
},
// 图片上传成功时 // 图片上传成功时
handleDetailSuccess(res) { handleDetailSuccess(res) {
this.infoEditForm.picUploadList.push(res.result.image_id); // 上传成功图片的id this.infoEditForm.picUploadList.push(res.result.image_id); // 上传成功图片的id
...@@ -149,4 +158,7 @@ export default { ...@@ -149,4 +158,7 @@ export default {
width: 64%; width: 64%;
margin: 0 auto; margin: 0 auto;
} }
.hide /deep/ .el-upload--picture-card {
display: none;
}
</style> </style>
const headerConfig = [ const headerConfig = [
{
name: "活动管理",
path: "/op/activity/manage"
},
{ {
name: "订单管理", name: "订单管理",
path: "/op/groupmeal/orderManagement" path: "/op/groupmeal/orderManagement"
......
...@@ -324,8 +324,8 @@ ...@@ -324,8 +324,8 @@
<el-input-number <el-input-number
v-model="item.refundableQuantity" v-model="item.refundableQuantity"
@change="handleChange" @change="handleChange"
:min="0" :min="1"
:max="item.goods_num - item.refund_count" :max="1"
></el-input-number> ></el-input-number>
</el-row> </el-row>
<el-row> <el-row>
...@@ -438,7 +438,7 @@ export default { ...@@ -438,7 +438,7 @@ export default {
totalNum: null, //总条数 totalNum: null, //总条数
// 退款 // 退款
refundShow: false, // 退款状态 refundShow:false, // 退款状态
checkAll: false, // 全选 checkAll: false, // 全选
isIndeterminate: false, isIndeterminate: false,
refundGoods: [ refundGoods: [
...@@ -491,20 +491,20 @@ export default { ...@@ -491,20 +491,20 @@ export default {
marketing_id: val, marketing_id: val,
}; };
const res = await newGetGoodsList(params); // 商品名称 const res = await newGetGoodsList(params); // 商品名称
this.getSubShopListMet(val) //自提点 this.getSubShopListMet(val); //自提点
// const res = await getSubShopList(params); // const res = await getSubShopList(params);
this.tradeNameArr = res.result; this.tradeNameArr = res.result;
// this.selLiftPoinArr = res.result; // this.selLiftPoinArr = res.result;
}, },
// 获取自提点 // 获取自提点
async getSubShopListMet(params) { async getSubShopListMet(params) {
try { try {
let marketing_id = '' let marketing_id = "";
if(params){ if (params) {
marketing_id = params marketing_id = params;
} }
const res = await newGetSubShopList({'marketing_id':marketing_id}); const res = await newGetSubShopList({ marketing_id: marketing_id });
this.selLiftPoinArr = res.result; this.selLiftPoinArr = res.result;
} catch (error) { } catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~"); this.$message.error("发生未知错误,请稍后再试一下吧~~~");
...@@ -608,11 +608,12 @@ export default { ...@@ -608,11 +608,12 @@ export default {
// 获取订单列表 // 获取订单列表
async getOrderListMet() { async getOrderListMet() {
if(this.$route.query.marketing_type == "4"){ if (this.$route.query.marketing_type == "4") {
this.orderQueryObj.marketing_id = this.$route.query.marketing_id; this.orderQueryObj.marketing_id = this.$route.query.marketing_id;
} }
try { try {
const res = await newGetOrderList(this.orderQueryObj); const res = await newGetOrderList(this.orderQueryObj);
console.log(res);
this.goodsNum = res.goods_num; // 商品共计 this.goodsNum = res.goods_num; // 商品共计
this.totalNum = res.count; // 商品总数 this.totalNum = res.count; // 商品总数
this.orderTableData = res.result; this.orderTableData = res.result;
...@@ -739,19 +740,23 @@ export default { ...@@ -739,19 +740,23 @@ export default {
}, },
created() { created() {
this.getMarketingListMet(); // 活动名称 this.getMarketingListMet(); // 活动名称
this.getSubShopListMet(); // 自提点 this.getSubShopListMet(); // 自提点
this.getOrderListMet(); // table列表 this.getOrderListMet(); // table列表
}, },
}; };
</script> </script>
<style lang="less" src="../orderManagement/index.less" scope></style> <style lang="less" src="../orderManagement/index.less" scoped></style>
<style lang="less" scoped> <style lang="less" scoped>
.check-wrap{ .check-wrap {
/deep/ .el-checkbox__label { /deep/ .el-checkbox__label {
white-space: normal; white-space: normal;
word-break: break-all; word-break: break-all;
}
} }
.refundCon /deep/ .el-row{
margin-bottom: 15px;
display: flex;
align-items: center;
} }
</style> </style>
...@@ -15,9 +15,3 @@ ...@@ -15,9 +15,3 @@
display: block; display: block;
text-align: center; 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 { ...@@ -513,20 +513,20 @@ export default {
marketing_id: val, marketing_id: val,
}; };
const res = await getGoodsList(params); // 商品名称 const res = await getGoodsList(params); // 商品名称
this.getSubShopListMet(val) //自提点 this.getSubShopListMet(val); //自提点
// const res = await getSubShopList(params); // const res = await getSubShopList(params);
this.tradeNameArr = res.result; this.tradeNameArr = res.result;
// this.selLiftPoinArr = res.result; // this.selLiftPoinArr = res.result;
}, },
// 获取自提点 // 获取自提点
async getSubShopListMet(params) { async getSubShopListMet(params) {
try { try {
let marketing_id = '' let marketing_id = "";
if(params){ if (params) {
marketing_id = params marketing_id = params;
} }
const res = await getSubShopList({'marketing_id':marketing_id}); const res = await getSubShopList({ marketing_id: marketing_id });
this.selLiftPoinArr = res.result; this.selLiftPoinArr = res.result;
} catch (error) { } catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~"); this.$message.error("发生未知错误,请稍后再试一下吧~~~");
...@@ -630,8 +630,8 @@ export default { ...@@ -630,8 +630,8 @@ export default {
// 获取订单列表 // 获取订单列表
async getOrderListMet() { async getOrderListMet() {
if(this.$route.query.marketing_type == "4"){ if (this.$route.query.marketing_type == "4") {
this.orderQueryObj.marketing_id = this.$route.query.marketing_id; this.orderQueryObj.marketing_id = this.$route.query.marketing_id;
} }
try { try {
const res = await getOrderList(this.orderQueryObj); const res = await getOrderList(this.orderQueryObj);
...@@ -761,19 +761,23 @@ export default { ...@@ -761,19 +761,23 @@ export default {
}, },
created() { created() {
this.getMarketingListMet(); // 活动名称 this.getMarketingListMet(); // 活动名称
this.getSubShopListMet(); // 自提点 this.getSubShopListMet(); // 自提点
this.getOrderListMet(); // table列表 this.getOrderListMet(); // table列表
}, },
}; };
</script> </script>
<style lang="less" src="./index.less" scope></style> <style lang="less" src="./index.less" scope></style>
<style lang="less" scoped> <style lang="less" scoped>
.check-wrap{ .check-wrap {
/deep/ .el-checkbox__label { /deep/ .el-checkbox__label {
white-space: normal; white-space: normal;
word-break: break-all; word-break: break-all;
}
} }
.refundCon /deep/ .el-row{
margin-bottom: 15px;
display: flex;
align-items: center;
} }
</style> </style>
...@@ -119,7 +119,7 @@ export function getOrderExportURL(eventId, type) { ...@@ -119,7 +119,7 @@ export function getOrderExportURL(eventId, type) {
// 获取订单列表 // 获取订单列表
export async function newGetOrderList(params) { export async function newGetOrderList(params) {
const res = await axios.get("/api/v1/order/oldbackground/op_order_list", { const res = await axios.get("/api/v1/order/background/op_order_list", {
params params
}); });
return res; return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment