修复优化促销问题

master
paulGao 2021-12-25 18:36:15 +08:00
parent 6c1d7cce8d
commit 54dcd2d8be
8 changed files with 31 additions and 35 deletions

View File

@ -183,7 +183,7 @@
>全选</Checkbox >全选</Checkbox
> >
</div> </div>
<div class="width_100 handle-btn" @click="delGoods"></div> <div class="width_100 handle-btn" @click="delGoods()"></div>
<!-- <div class="width_100 handle-btn" @click="collectGoods"></div> --> <!-- <div class="width_100 handle-btn" @click="collectGoods"></div> -->
<div class="width_100 handle-btn" @click="clearCart"></div> <div class="width_100 handle-btn" @click="clearCart"></div>
</div> </div>
@ -278,7 +278,9 @@ export default {
const list = this.cartList; const list = this.cartList;
list.forEach((shop) => { list.forEach((shop) => {
shop.skuList.forEach((goods) => { shop.skuList.forEach((goods) => {
if(goods.checked) {
idArr.push(goods.goodsSku.id); idArr.push(goods.goodsSku.id);
}
}); });
}); });
} else { } else {

View File

@ -437,6 +437,10 @@ export const setHotWords = (params) => {
return postRequest(`/hotwords`, params); return postRequest(`/hotwords`, params);
}; };
// 删除热搜词
export const deleteHotWords = (words) => {
return deleteRequest(`/hotwords/${words}`);
};
// 获取热搜词 // 获取热搜词
export const getHotWords = () => { export const getHotWords = () => {

View File

@ -215,7 +215,7 @@ export const getFullDiscountById = id => {
}; };
// 开启、关闭满额活动 // 开启、关闭满额活动
export const updateFullDiscount = (id, promotionStatus) => { export const updateFullDiscount = (id, promotionStatus) => {
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`) return putRequest(`/promotion/fullDiscount/status/${id}`)
} }
// 积分商品列表 // 积分商品列表
export const getPointsGoodsList = params => { export const getPointsGoodsList = params => {

View File

@ -120,7 +120,7 @@ export default {
// //
pageNumber: 1, // pageNumber: 1, //
pageSize: 10, // pageSize: 10, //
sort: "startTime", // sort: "create_time", //
order: "desc", // order: "desc", //
getType: "", // getType: "", //
}, },

View File

@ -79,14 +79,6 @@
@click="openOrClose(row)" @click="openOrClose(row)"
>关闭</Button >关闭</Button
> >
<Button
type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
style="margin-left: 5px"
size="small"
@click="openOrClose(row)"
>开启</Button
>
</div> </div>
</template> </template>
</Table> </Table>
@ -177,11 +169,8 @@ export default {
// //
openOrClose(row) { openOrClose(row) {
let name = "开启"; let name = "开启";
let status = "START";
if (row.promotionStatus === "START") { if (row.promotionStatus === "START") {
name = "关闭"; name = "关闭";
status = "CLOSE";
}
this.$Modal.confirm({ this.$Modal.confirm({
title: "提示", title: "提示",
// //
@ -189,7 +178,7 @@ export default {
loading: true, loading: true,
onOk: () => { onOk: () => {
// //
updateFullDiscount(row.id, status).then((res) => { updateFullDiscount(row.id).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success(`${name}成功`); this.$Message.success(`${name}成功`);
@ -198,6 +187,7 @@ export default {
}); });
}, },
}); });
}
}, },
changePage(v) { changePage(v) {
// //

View File

@ -341,10 +341,10 @@ export default {
onOk: () => { onOk: () => {
let ids = []; let ids = [];
this.selectedGoods.forEach(function (e) { this.selectedGoods.forEach(function (e) {
ids.push(e.id); ids.push(e.skuId);
}); });
this.promotionGoodsList = this.promotionGoodsList.filter((item) => { this.promotionGoodsList = this.promotionGoodsList.filter((item) => {
return !ids.includes(item.id); return !ids.includes(item.skuId);
}); });
}, },
}); });

View File

@ -121,7 +121,7 @@
>关闭</Button >关闭</Button
> >
<Button <Button
v-if="row.promotionStatus === 'CLOSE'" v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"
type="error" type="error"
size="small" size="small"
@click="close(row.id)" @click="close(row.id)"

View File

@ -290,10 +290,10 @@ export default {
onOk: () => { onOk: () => {
let ids = []; let ids = [];
this.selectList.forEach(function (e) { this.selectList.forEach(function (e) {
ids.push(e.id); ids.push(e.skuId);
}); });
this.goodsData = this.goodsData.filter((item) => { this.goodsData = this.goodsData.filter((item) => {
return !ids.includes(item.id); return !ids.includes(item.skuId);
}); });
}, },
}); });