Commit bc156245 authored by lihui's avatar lihui

fix: bug-more

parent bc8ee4ae
...@@ -115,7 +115,7 @@ exports.marketingInfo = async ctx => { ...@@ -115,7 +115,7 @@ exports.marketingInfo = async ctx => {
// 关闭/开启 活动 // 关闭/开启 活动
exports.updateActivity = 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 = { const opts = {
url, url,
method: "POST", method: "POST",
......
...@@ -68,7 +68,7 @@ router.post(`${API_VERSION}/merchant/authority/get_user_info`, user.getUser_deta ...@@ -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}/marketing/background/marketing_list`, activity.getActivityList)
router.get(`${API_VERSION}/order/background/pindan_marketing_info_data_statistics`, activity.checkActivityDetailInfo) 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}/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.post(`${API_VERSION}/marketing/background/marketing_info`, activity.checkActivityDetail)
// //
router.get(`${API_VERSION}/marketing/background/take_place_list`, activity.getPlaceList) 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 @@ ...@@ -155,6 +155,7 @@
</div> </div>
</el-form> </el-form>
</div> </div>
<YDDialog />
</layout> </layout>
</template> </template>
<script> <script>
...@@ -298,14 +299,16 @@ export default { ...@@ -298,14 +299,16 @@ export default {
this.storeQuery = { this.storeQuery = {
marketing_id: val.activiteId, marketing_id: val.activiteId,
online_status: 2, // 1 启用 2 关闭 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) { handleStart(val) {
this.storeQuery = { this.storeQuery = {
marketing_id: val.activiteId, marketing_id: val.activiteId,
online_status: 1 // 1 启用 2 关闭 online_status: 1, // 1 启用 2 关闭
marketing_type: 4
}; };
}, },
// 查看详情 // 查看详情
......
...@@ -253,6 +253,10 @@ export default { ...@@ -253,6 +253,10 @@ export default {
addProduc: { addProduc: {
type: Array, type: Array,
required: () => {} required: () => {}
},
stepTwoTitle: {
type: String,
default: ""
} }
}, },
data() { data() {
...@@ -402,20 +406,25 @@ export default { ...@@ -402,20 +406,25 @@ export default {
message: "修改成功", message: "修改成功",
type: "success" type: "success"
}); });
this.pindanGoodsMet(); await this.pindanGoodsMet();
setTimeout(() => { let result = null;
for (var i in this.comTableData) { for (var j in this.comLibTableData) {
if (this.comTableData[i].goods_sku_id == goodsSkuID) { if (this.comLibTableData[j].goods_sku_id == goodsSkuID) {
this.comTableData.splice(i, 1, this.comLibTableData[i]); 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; this.addCommodityPopup = false;
} else { } else {
ElMessage.error(res.reason); ElMessage.error(res.reason);
...@@ -446,7 +455,7 @@ export default { ...@@ -446,7 +455,7 @@ export default {
// 添加商品 // 添加商品
async addGoodsMet() { async addGoodsMet() {
const res = await addGoods({ const res = await addGoods({
marketing_name: this.editInfo.title, marketing_name: this.stepTwoTitle,
goods_name: this.commodityForm.goods_name, goods_name: this.commodityForm.goods_name,
desc_pic_url: this.picUploadList.join(","), desc_pic_url: this.picUploadList.join(","),
desc: "", desc: "",
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
class="startTimePicker" class="startTimePicker"
v-model="startDate" v-model="startDate"
type="datetime" type="datetime"
popper-class="date_picker"
:disabledDate="pickerOptions.disabledDateStart" :disabledDate="pickerOptions.disabledDateStart"
placeholder="拼单开始时间" placeholder="拼单开始时间"
@change="changeStartTime" @change="changeStartTime"
...@@ -15,14 +16,14 @@ ...@@ -15,14 +16,14 @@
<el-date-picker <el-date-picker
class="endTimePicker" class="endTimePicker"
v-model="endDate" v-model="endDate"
:clearable="false"
type="datetime" type="datetime"
placeholder="拼单结束时间" placeholder="拼单结束时间"
:disabledDate="pickerOptions.disabledDateEnd" :disabledDate="option1"
@change="changeEndTime" @change="changeEndTime"
> >
</el-date-picker> </el-date-picker>
</div> </div>
<!-- 自提点列表 --> <!-- 自提点列表 -->
<div <div
class="card-wrapper" class="card-wrapper"
...@@ -232,6 +233,7 @@ let checkphone = (rule, value, callback) => { ...@@ -232,6 +233,7 @@ let checkphone = (rule, value, callback) => {
callback(); callback();
} }
}; };
export default { export default {
data() { data() {
return { return {
...@@ -243,13 +245,7 @@ export default { ...@@ -243,13 +245,7 @@ export default {
disabledDateStart(time) { disabledDateStart(time) {
let _now = Date.now(); let _now = Date.now();
let threeDays = _now + 3 * 24 * 60 * 60 * 1000; let threeDays = _now + 3 * 24 * 60 * 60 * 1000;
return time.getTime() < _now || time.getTime() > threeDays; //大于当前的禁止,小于3天前的禁止 return time.getTime() < _now - 8.64e7 || 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天前的禁止
} }
}, },
mapDialogVisible: false, mapDialogVisible: false,
...@@ -297,6 +293,22 @@ export default { ...@@ -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: { props: {
spellOrderSetArr: { spellOrderSetArr: {
type: Array, type: Array,
...@@ -509,6 +521,16 @@ export default { ...@@ -509,6 +521,16 @@ export default {
</script> </script>
<style lang="less" scope> <style lang="less" scope>
.el-picker-panel {
.el-picker-panel__footer {
.el-button--text {
display: none;
}
}
}
</style>
<style lang="less">
.card-wrapper { .card-wrapper {
width: 100%; width: 100%;
//height: 500px; //height: 500px;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
v-show="active === 2" v-show="active === 2"
:addProduc="addProducArr" :addProduc="addProducArr"
:editInfo="infoEditArr" :editInfo="infoEditArr"
:stepTwoTitle="stepTwoTitle"
/> />
<spellOrderSet <spellOrderSet
ref="spellOrderSet" ref="spellOrderSet"
...@@ -76,7 +77,8 @@ export default { ...@@ -76,7 +77,8 @@ export default {
endDate: "", // 结束时间 endDate: "", // 结束时间
takePlaceIDArr: [], takePlaceIDArr: [],
startTime: "", startTime: "",
endTime: "" endTime: "",
stepTwoTitle: "" // 传给addProduct的title
}; };
}, },
...@@ -93,7 +95,7 @@ export default { ...@@ -93,7 +95,7 @@ export default {
ElMessage.error("请填写商品标题"); ElMessage.error("请填写商品标题");
return; return;
} }
// this.infoEditArr.title = this.$refs.infoEdit.infoEditForm.title; this.stepTwoTitle = this.$refs.infoEdit.infoEditForm.title;
this.active = 2; this.active = 2;
} else if (this.active === 2) { } else if (this.active === 2) {
if (this.$refs.addProduc.comTableData.length == 0) { if (this.$refs.addProduc.comTableData.length == 0) {
......
...@@ -82,7 +82,7 @@ class ActivityService { ...@@ -82,7 +82,7 @@ class ActivityService {
// 关闭/开启 活动 // 关闭/开启 活动
static async updateActivity(query) { static async updateActivity(query) {
const res = await axios.post( const res = await axios.post(
"/api/v1/marketing/background/update_marketing", "/api/v1/marketing/background/update_marketing_online_status",
{ {
...query ...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