修复优化促销问题
parent
6c1d7cce8d
commit
54dcd2d8be
|
@ -183,7 +183,7 @@
|
|||
>全选</Checkbox
|
||||
>
|
||||
</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="clearCart">清空购物车</div>
|
||||
</div>
|
||||
|
@ -278,7 +278,9 @@ export default {
|
|||
const list = this.cartList;
|
||||
list.forEach((shop) => {
|
||||
shop.skuList.forEach((goods) => {
|
||||
if(goods.checked) {
|
||||
idArr.push(goods.goodsSku.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -437,6 +437,10 @@ export const setHotWords = (params) => {
|
|||
return postRequest(`/hotwords`, params);
|
||||
};
|
||||
|
||||
// 删除热搜词
|
||||
export const deleteHotWords = (words) => {
|
||||
return deleteRequest(`/hotwords/${words}`);
|
||||
};
|
||||
|
||||
// 获取热搜词
|
||||
export const getHotWords = () => {
|
||||
|
|
|
@ -215,7 +215,7 @@ export const getFullDiscountById = id => {
|
|||
};
|
||||
// 开启、关闭满额活动
|
||||
export const updateFullDiscount = (id, promotionStatus) => {
|
||||
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
|
||||
return putRequest(`/promotion/fullDiscount/status/${id}`)
|
||||
}
|
||||
// 积分商品列表
|
||||
export const getPointsGoodsList = params => {
|
||||
|
|
|
@ -120,7 +120,7 @@ export default {
|
|||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime", // 默认排序字段
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
},
|
||||
|
|
|
@ -79,14 +79,6 @@
|
|||
@click="openOrClose(row)"
|
||||
>关闭</Button
|
||||
>
|
||||
<Button
|
||||
type="success"
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
style="margin-left: 5px"
|
||||
size="small"
|
||||
@click="openOrClose(row)"
|
||||
>开启</Button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
|
@ -177,11 +169,8 @@ export default {
|
|||
// 开启或关闭活动
|
||||
openOrClose(row) {
|
||||
let name = "开启";
|
||||
let status = "START";
|
||||
if (row.promotionStatus === "START") {
|
||||
name = "关闭";
|
||||
status = "CLOSE";
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
// 记得确认修改此处
|
||||
|
@ -189,7 +178,7 @@ export default {
|
|||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
updateFullDiscount(row.id, status).then((res) => {
|
||||
updateFullDiscount(row.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success(`${name}成功`);
|
||||
|
@ -198,6 +187,7 @@ export default {
|
|||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
changePage(v) {
|
||||
// 改变页数
|
||||
|
|
|
@ -341,10 +341,10 @@ export default {
|
|||
onOk: () => {
|
||||
let ids = [];
|
||||
this.selectedGoods.forEach(function (e) {
|
||||
ids.push(e.id);
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
this.promotionGoodsList = this.promotionGoodsList.filter((item) => {
|
||||
return !ids.includes(item.id);
|
||||
return !ids.includes(item.skuId);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
>关闭</Button
|
||||
>
|
||||
<Button
|
||||
v-if="row.promotionStatus === 'CLOSE'"
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"
|
||||
type="error"
|
||||
size="small"
|
||||
@click="close(row.id)"
|
||||
|
|
|
@ -290,10 +290,10 @@ export default {
|
|||
onOk: () => {
|
||||
let ids = [];
|
||||
this.selectList.forEach(function (e) {
|
||||
ids.push(e.id);
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
this.goodsData = this.goodsData.filter((item) => {
|
||||
return !ids.includes(item.id);
|
||||
return !ids.includes(item.skuId);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue