Commit bc156245 authored by lihui's avatar lihui

fix: bug-more

parent bc8ee4ae
......@@ -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",
......
......@@ -68,7 +68,7 @@ router.post(`${API_VERSION}/merchant/authority/get_user_info`, user.getUser_deta
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)
......
<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>
......@@ -155,6 +155,7 @@
</div>
</el-form>
</div>
<YDDialog />
</layout>
</template>
<script>
......@@ -298,14 +299,16 @@ export default {
this.storeQuery = {
marketing_id: val.activiteId,
online_status: 2, // 1 启用 2 关闭
end_time: dayJs().format("YYYY-MM-DD HH:mm:ss")
marketing_type: 4
// end_time: dayJs().format("YYYY-MM-DD HH:mm:ss")
};
},
// 开始
handleStart(val) {
this.storeQuery = {
marketing_id: val.activiteId,
online_status: 1 // 1 启用 2 关闭
online_status: 1, // 1 启用 2 关闭
marketing_type: 4
};
},
// 查看详情
......
......@@ -253,6 +253,10 @@ export default {
addProduc: {
type: Array,
required: () => {}
},
stepTwoTitle: {
type: String,
default: ""
}
},
data() {
......@@ -402,20 +406,25 @@ export default {
message: "修改成功",
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.comLibTableData[i]);
}
await this.pindanGoodsMet();
let result = null;
for (var j in this.comLibTableData) {
if (this.comLibTableData[j].goods_sku_id == goodsSkuID) {
result = this.comLibTableData[j];
}
}
for (var i in this.comTableData) {
if (this.comTableData[i].goods_sku_id == result.goods_sku_id) {
this.comTableData.splice(i, 1, result);
}
}
// 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 {
ElMessage.error(res.reason);
......@@ -446,7 +455,7 @@ export default {
// 添加商品
async addGoodsMet() {
const res = await addGoods({
marketing_name: this.editInfo.title,
marketing_name: this.stepTwoTitle,
goods_name: this.commodityForm.goods_name,
desc_pic_url: this.picUploadList.join(","),
desc: "",
......
......@@ -7,6 +7,7 @@
class="startTimePicker"
v-model="startDate"
type="datetime"
popper-class="date_picker"
:disabledDate="pickerOptions.disabledDateStart"
placeholder="拼单开始时间"
@change="changeStartTime"
......@@ -15,14 +16,14 @@
<el-date-picker
class="endTimePicker"
v-model="endDate"
:clearable="false"
type="datetime"
placeholder="拼单结束时间"
:disabledDate="pickerOptions.disabledDateEnd"
:disabledDate="option1"
@change="changeEndTime"
>
</el-date-picker>
</div>
<!-- 自提点列表 -->
<div
class="card-wrapper"
......@@ -232,6 +233,7 @@ let checkphone = (rule, value, callback) => {
callback();
}
};
export default {
data() {
return {
......@@ -243,13 +245,7 @@ export default {
disabledDateStart(time) {
let _now = Date.now();
let threeDays = _now + 3 * 24 * 60 * 60 * 1000;
return time.getTime() < _now || time.getTime() > threeDays; //大于当前的禁止,小于3天前的禁止
},
disabledDateEnd(time) {
let _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,
......@@ -297,6 +293,22 @@ 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,
......@@ -509,6 +521,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;
......
......@@ -23,6 +23,7 @@
v-show="active === 2"
:addProduc="addProducArr"
:editInfo="infoEditArr"
:stepTwoTitle="stepTwoTitle"
/>
<spellOrderSet
ref="spellOrderSet"
......@@ -76,7 +77,8 @@ export default {
endDate: "", // 结束时间
takePlaceIDArr: [],
startTime: "",
endTime: ""
endTime: "",
stepTwoTitle: "" // 传给addProduct的title
};
},
......@@ -93,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) {
......
......@@ -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
}
......
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