Commit bc8ee4ae authored by lihui's avatar lihui

fix: bug--all

parents d30b982e 16532533
......@@ -150,7 +150,7 @@ exports.newGetOrderList = async ctx => {
// 获取活动名称
exports.newGetMarketingList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/marketing_list`;
const url = `${GROUPMEAL_URI}/order/background/order_condition_marketing_list`;
const opts = {
url,
method: "GET"
......@@ -160,7 +160,7 @@ exports.newGetMarketingList = async ctx => {
// 获取商品名称
exports.newGetGoodsList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/goods_list`;
const url = `${GROUPMEAL_URI}/order/background/order_condition_goods_list`;
const opts = {
url,
method: "GET"
......@@ -170,7 +170,7 @@ exports.newGetGoodsList = async ctx => {
// 获取自提点
exports.newGetSubShopList = async ctx => {
const url = `${GROUPMEAL_URI}/order/background/sub_shop_list`;
const url = `${GROUPMEAL_URI}/order/background/order_condition_take_place_list`;
const opts = {
url,
method: "GET"
......
......@@ -103,9 +103,9 @@ router.post(`${API_VERSION}/order/oldbackground/order_refund`, groupmeal.orderRe
// 新订单管理
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/goods_list`, groupmeal.newGetGoodsList);
router.get(`${API_VERSION}/order/background/sub_shop_list`, groupmeal.newGetSubShopList);
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);
......
<template>
<Layout>
<layout>
<div
class="manage-wrapper"
v-loading="tableLoading"
......@@ -155,15 +155,18 @@
</div>
</el-form>
</div>
</Layout>
</layout>
</template>
<script>
import { Layout } from "../../Groupmeal/layout/index.vue";
import layout from "../../Groupmeal/layout/index.vue";
import { ElMessage } from "element-plus";
import ActivityService from "@/service/Activity/index";
import dayJs from "dayjs";
export default {
name: "Manage",
components: {
layout
},
data() {
return {
activity: {
......@@ -184,9 +187,6 @@ export default {
]
};
},
components: {
Layout
},
methods: {
/* API */
// 获取商品列表
......
......@@ -65,12 +65,12 @@
>
<el-form-item label="图片:">
<el-upload
:class="{hide:hideUpload}"
:class="{ hide: hideUpload }"
:data="{ type: 1 }"
:action="uploadUrl"
:on-preview="previewImage"
:on-success="handleDetailSuccess"
:on-change = "handleDetailChange"
:on-change="handleDetailChange"
:before-remove="removeDetailFiles"
:file-list="picUrlList"
auto-upload
......@@ -241,19 +241,19 @@ import {
getBusinessList,
pindanGoods,
markGoodsInfo,
editGoods,
editGoods
} from "../../../../service/Activity/index";
export default {
props: {
editInfo: {
type: Object,
required: () => {},
required: () => {}
},
addProduc: {
type: Array,
required: () => {},
},
required: () => {}
}
},
data() {
return {
......@@ -274,7 +274,7 @@ export default {
original_price: "",
inventory_total: null,
total_amount_order: null,
business1: "",
business1: ""
},
picUrlList: [],
......@@ -282,14 +282,14 @@ export default {
isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
hideUpload: false,
limitCount:"1",
limitCount: 1,
// 商品库添加
selCommodityPopup: false, // 商品库添加弹窗状态
business2: "", // 商家
multipleSelection: [], // 勾选的数据
goodsSkuID: "",
goodsSkuID: ""
};
},
computed: {
......@@ -303,7 +303,7 @@ export default {
this.commodityForm.total_amount_order
);
}
},
}
},
methods: {
// 上移
......@@ -334,7 +334,7 @@ export default {
this.isShowPopver = true;
},
handleDetailChange(){
handleDetailChange() {
this.hideUpload = this.picUploadList.length >= this.limitCount;
},
......@@ -350,7 +350,7 @@ export default {
this.picUploadList.splice(i, 1);
}
}
this.hideUpload = this.picUploadList.length >= this.limitCount;
this.hideUpload = this.picUploadList.length >= this.limitCount;
},
// 获取商家
......@@ -360,7 +360,7 @@ export default {
const res = await getBusinessList(params);
this.businessOpt = [
{ ota_id: "", ota_name: "全部" },
...res.result.list,
...res.result.list
];
} catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~");
......@@ -377,7 +377,7 @@ export default {
this.commodityForm.business1 = res.result.goods_info.ota_id;
for (var i in res.result.goods_info.desc_pic_url_list) {
this.picUrlList.push({
url: res.result.goods_info.desc_pic_url_list[i],
url: res.result.goods_info.desc_pic_url_list[i]
});
}
},
......@@ -395,26 +395,26 @@ export default {
marketing_type: "4",
ota_id: this.commodityForm.business1,
op_cur_user: store.state.userInfo.email,
goods_sku_id: goodsSkuID,
goods_sku_id: goodsSkuID
});
if (res.code == 0) {
ElMessage.success({
message: "修改成功",
type: "success",
type: "success"
});
this.pindanGoodsMet();
setTimeout(() => {
for (var i in this.comTableData) {
if (this.comTableData[i].goods_sku_id == goodsSkuID) {
this.comTableData.splice(i, 1);
this.comTableData.splice(i, 1, this.comLibTableData[i]);
}
}
for (var j in this.comLibTableData) {
if (this.comLibTableData[j].goods_sku_id == goodsSkuID) {
this.comTableData.push(this.comLibTableData[j]);
}
}
// for (var j in this.comLibTableData) {
// if (this.comLibTableData[j].goods_sku_id == goodsSkuID) {
// this.comTableData.push(this.comLibTableData[j]);
// }
// }
}, 500);
this.addCommodityPopup = false;
} else {
......@@ -455,12 +455,12 @@ export default {
marketing_type: "4",
price: this.commodityForm.price,
ota_id: this.commodityForm.business1,
op_cur_user: store.state.userInfo.email,
op_cur_user: store.state.userInfo.email
});
if (res.code == 0) {
ElMessage.success({
message: "添加商品成功",
type: "success",
type: "success"
});
this.comTableData.push(res.result.goods_info);
this.addCommodityPopup = false;
......@@ -477,7 +477,7 @@ export default {
// 添加商品保存
commoditySave(infoForm) {
this.$refs[infoForm].validate((valid) => {
this.$refs[infoForm].validate(valid => {
if (valid) {
if (this.addCommodityTitle == "商品添加") {
this.addGoodsMet();
......@@ -516,9 +516,9 @@ export default {
if (this.comTableData.length == 0) {
this.comTableData.push(...this.multipleSelection);
} else {
this.multipleSelection.forEach((item) => {
this.multipleSelection.forEach(item => {
let num = 0;
this.comTableData.some((val) => {
this.comTableData.some(val => {
num++;
if (val.goods_sku_id === item.goods_sku_id) {
val.goods_sku_id = item.goods_sku_id;
......@@ -539,26 +539,26 @@ export default {
this.comTableData.splice(i, 1);
}
}
},
}
},
watch: {
addProduc: function (newVal) {
addProduc: function(newVal) {
let marketingId = this.$route.query.marketing_id;
if (marketingId == undefined) {
return;
}
this.comTableData = newVal;
},
}
},
created() {
this.getBusinessListMet();
},
}
};
</script>
<style scoped>
.addProduc {
width: 64%;
width: 90%;
margin: 0 auto;
}
......@@ -590,6 +590,6 @@ export default {
}
.hide /deep/ .el-upload--picture-card {
display: none;
display: none;
}
</style>
\ No newline at end of file
</style>
<template>
<div class="infoEditing">
{{ picSubmitList.length }}
<el-form ref="infoEditForm" :model="infoEditForm" label-width="80px">
<el-form-item label="标题:">
<el-input v-model="infoEditForm.title" maxlength="30"></el-input>
......@@ -88,10 +87,11 @@ export default {
url: this.propData.pindan_pic_url[i]
});
}
this.hideUpload = this.picSubmitList.length >= this.limitCount; // 大于9 隐藏
}
},
deep: true
// immediate: true
deep: true,
immediate: true
}
},
methods: {
......@@ -102,8 +102,7 @@ export default {
},
handleDetailChange() {
this.hideUpload =
this.infoEditForm.picUploadList.length >= this.limitCount;
this.hideUpload = this.picSubmitList.length >= this.limitCount;
},
// 图片上传成功时
......@@ -113,6 +112,7 @@ export default {
// 发布功能需要的图片列表
url: res.result.url
});
this.hideUpload = this.picSubmitList.length >= this.limitCount;
},
// 图片删除后
......@@ -122,6 +122,7 @@ export default {
this.picSubmitList.splice(i, 1);
}
}
this.hideUpload = this.picSubmitList.length >= this.limitCount;
},
// 获取营销活动详情
......
......@@ -8,7 +8,6 @@
v-model="startDate"
type="datetime"
:disabledDate="pickerOptions.disabledDateStart"
:default-value="new Date()"
placeholder="拼单开始时间"
@change="changeStartTime"
>
......@@ -17,7 +16,6 @@
class="endTimePicker"
v-model="endDate"
type="datetime"
:default-value="new Date()"
placeholder="拼单结束时间"
:disabledDate="pickerOptions.disabledDateEnd"
@change="changeEndTime"
......@@ -248,12 +246,7 @@ export default {
return time.getTime() < _now || time.getTime() > threeDays; //大于当前的禁止,小于3天前的禁止
},
disabledDateEnd(time) {
let _now = null;
if (this.startDate) {
_now = this.startDate;
} else {
_now = Date.now();
}
let _now = Date.now();
let ninety = 90 * 24 * 60 * 60 * 1000;
let ninetyDays = _now + ninety;
return time.getTime() < _now || time.getTime() > ninetyDays; //大于当前的禁止,小于90天前的禁止
......
......@@ -71,9 +71,9 @@
>
<el-option
v-for="item in selLiftPoinArr"
:key="item.sub_shop_id"
:label="item.sub_shop_name"
:value="item.sub_shop_id"
:key="item.take_place_id"
:label="item.take_place_name"
:value="item.take_place_id"
></el-option>
</el-select>
</el-form-item>
......@@ -491,6 +491,7 @@ export default {
marketing_id: val,
};
const res = await newGetGoodsList(params); // 商品名称
console.log(res);
this.getSubShopListMet(val); //自提点
// const res = await getSubShopList(params);
this.tradeNameArr = res.result;
......
......@@ -127,13 +127,13 @@ export async function newGetOrderList(params) {
// 获取活动名称
export async function newGetMarketingList() {
const res = await axios.get("/api/v1/order/background/marketing_list");
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/goods_list", {
const res = await axios.get("/api/v1/order/background/order_condition_goods_list", {
params
});
return res;
......@@ -141,7 +141,7 @@ export async function newGetGoodsList(params) {
// 获取自提点
export async function newGetSubShopList(params) {
const res = await axios.get("/api/v1/order/background/sub_shop_list",{
const res = await axios.get("/api/v1/order/background/order_condition_take_place_list",{
params
});
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