-
- {{shop.storeName}}
+
+ {{
+ shop.storeName
+ }}
-
+
-
+
¥{{ item.price }}
- {{ item.couponDiscount }}折
- 满{{item.consumeThreshold}}元可用
-
+ {{ item.couponDiscount }}折
+ 满{{ item.consumeThreshold }}元可用
+
-
{{shop.promotionNotice}}
+
{{ shop.promotionNotice }}
-
+
-
-
+
+
{{ goods.goodsSku.goodsName }}
-
{{ goods.purchasePrice | unitPrice("¥") }}
-
-
{{goods.goodsSku.quantity > 0 ? '有货' : '无货'}}
+
+
+ {{ goods.goodsSku.quantity > 0 ? "有货" : "无货" }}
+
{{ goods.subTotal | unitPrice("¥") }}
- 删除
- 收藏
+ 删除
+ 收藏
-
{{goods.errorMessage}}
+
{{ goods.errorMessage }}
-
优惠券列表
-
-
+
+
会员列表列表
@@ -44,28 +48,26 @@
diff --git a/manager/src/views/promotion/pointsGoodsCategory/pointsGoodsCategory.vue b/manager/src/views/promotions/points-goods-category/points-goods-category.vue
similarity index 100%
rename from manager/src/views/promotion/pointsGoodsCategory/pointsGoodsCategory.vue
rename to manager/src/views/promotions/points-goods-category/points-goods-category.vue
diff --git a/manager/src/views/promotion/pointsGoods/addPointsGoods.vue b/manager/src/views/promotions/points-goods/points-goods-add.vue
similarity index 87%
rename from manager/src/views/promotion/pointsGoods/addPointsGoods.vue
rename to manager/src/views/promotions/points-goods/points-goods-add.vue
index 7620fb40..0676e227 100644
--- a/manager/src/views/promotion/pointsGoods/addPointsGoods.vue
+++ b/manager/src/views/promotions/points-goods/points-goods-add.vue
@@ -34,14 +34,11 @@
/>
-
+
-
+
@@ -198,10 +189,7 @@ export default {
key: "goodsName",
minWidth: 120,
render: (h, params) => {
- return h(
- "div",
- params.row.goodsSku.goodsName
- );
+ return h("div", params.row.goodsSku.goodsName);
},
},
{
@@ -214,10 +202,7 @@ export default {
key: "storeName",
minWidth: 60,
render: (h, params) => {
- return h(
- "div",
- params.row.goodsSku.storeName
- );
+ return h("div", params.row.goodsSku.storeName);
},
},
{
@@ -236,10 +221,7 @@ export default {
key: "quantity",
minWidth: 20,
render: (h, params) => {
- return h(
- "div",
- params.row.goodsSku.quantity
- );
+ return h("div", params.row.goodsSku.quantity);
},
},
{
@@ -308,12 +290,8 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
let params = this.promotionGoodsList;
- const start = this.$options.filters.unixToDate(
- this.form.startTime / 1000
- );
- const end = this.$options.filters.unixToDate(
- this.form.endTime / 1000
- );
+ const start = this.$options.filters.unixToDate(this.form.startTime / 1000);
+ const end = this.$options.filters.unixToDate(this.form.endTime / 1000);
if (!params || params.length == 0) {
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
@@ -339,15 +317,12 @@ export default {
// 关闭当前页面
closeCurrentPage() {
this.$store.commit("removeTag", "add-points-goods");
- localStorage.pageOpenedList = JSON.stringify(
- this.$store.state.app.pageOpenedList
- );
+ localStorage.pageOpenedList = JSON.stringify(this.$store.state.app.pageOpenedList);
this.$router.go(-1);
},
// 选择分类
changeCategory(val, index) {
this.promotionGoodsList[index].pointsGoodsCategoryName = val.label;
- console.log(this.promotionGoodsList);
},
// 变更选中状态
changeSelect(e) {
@@ -368,11 +343,9 @@ export default {
this.selectedGoods.forEach(function (e) {
ids.push(e.id);
});
- this.promotionGoodsList = this.promotionGoodsList.filter(
- (item) => {
- return !ids.includes(item.id);
- }
- );
+ this.promotionGoodsList = this.promotionGoodsList.filter((item) => {
+ return !ids.includes(item.id);
+ });
},
});
},
@@ -380,12 +353,13 @@ export default {
// 删除商品
this.promotionGoodsList.splice(index, 1);
},
- openSkuList() { // 显示商品选择器
+ openSkuList() {
+ // 显示商品选择器
this.$refs.skuSelect.open("goods");
- let data = JSON.parse(JSON.stringify(this.promotionGoodsList))
- data.forEach(e => {
- e.id = e.skuId
- })
+ let data = JSON.parse(JSON.stringify(this.promotionGoodsList));
+ data.forEach((e) => {
+ e.id = e.skuId;
+ });
this.$refs.skuSelect.goodsData = data;
},
selectedGoodsData(item) {
@@ -395,12 +369,16 @@ export default {
const obj = {
settlementPrice: e.settlementPrice || 0,
pointsGoodsCategoryId: e.pointsGoodsCategoryId || 0,
- pointsGoodsCategoryName:e.pointsGoodsCategoryName || "",
- activeStock:e.activeStock || 0,
- points:e.points || 0,
+ pointsGoodsCategoryName: e.pointsGoodsCategoryName || "",
+ activeStock: e.activeStock || 0,
+ points: e.points || 0,
skuId: e.id,
- goodsSku: e.goodsSku || e
- }
+ goodsId: e.goodsId,
+ originalPrice: e.price || 0,
+ thumbnail: e.thumbnail || "",
+ goodsName: e.goodsName || "",
+ goodsSku: e,
+ };
list.push(obj);
});
this.promotionGoodsList = list;
@@ -426,8 +404,7 @@ h4 {
margin-left: 10px;
color: #999;
}
-.wrapper{
+.wrapper {
min-height: 800px;
}
-
diff --git a/manager/src/views/promotion/pointsGoods/editPointsGoods.vue b/manager/src/views/promotions/points-goods/points-goods-edit.vue
similarity index 100%
rename from manager/src/views/promotion/pointsGoods/editPointsGoods.vue
rename to manager/src/views/promotions/points-goods/points-goods-edit.vue
diff --git a/manager/src/views/promotion/pointsGoods/pointsGoods.vue b/manager/src/views/promotions/points-goods/points-goods.vue
similarity index 63%
rename from manager/src/views/promotion/pointsGoods/pointsGoods.vue
rename to manager/src/views/promotions/points-goods/points-goods.vue
index 6f6e507d..ead2b46f 100644
--- a/manager/src/views/promotion/pointsGoods/pointsGoods.vue
+++ b/manager/src/views/promotions/points-goods/points-goods.vue
@@ -2,25 +2,62 @@
-
@@ -29,38 +66,84 @@
- {{ row.goodsSku.price | unitPrice("¥") }}
+ {{ row.originalPrice | unitPrice("¥") }}
{{ row.settlementPrice | unitPrice("¥") }}
- {{ row.goodsSku.quantity }}
+ {{ row.activeStock }}
{{ row.startTime }}
{{ row.endTime }}
-
-
-
+
+
+
-
+
@@ -72,11 +155,13 @@ import {
editPointsGoodsStatus,
deletePointsGoodsStatus,
} from "@/api/promotion";
-import vueQr from 'vue-qr'
+import vueQr from "vue-qr";
+import { promotionsStatusRender } from "@/utils/promotions";
+
export default {
name: "pointsGoods",
components: {
- "vue-qr":vueQr
+ "vue-qr": vueQr,
},
data() {
return {
@@ -94,7 +179,8 @@ export default {
{ label: "已结束", value: "END" },
{ label: "已关闭", value: "CLOSE" },
],
- columns: [ // 表头
+ columns: [
+ // 表头
{
title: "商品名称",
slot: "goodsName",
@@ -142,22 +228,7 @@ export default {
key: "promotionStatus",
width: 100,
render: (h, params) => {
- let text = "未知",
- color = "";
- if (params.row.promotionStatus == "NEW") {
- text = "未开始";
- color = "geekblue";
- } else if (params.row.promotionStatus == "START") {
- text = "已开始";
- color = "blue";
- } else if (params.row.promotionStatus == "END") {
- text = "已结束";
- color = "green";
- } else if (params.row.promotionStatus == "CLOSE") {
- text = "已关闭";
- color = "volcano";
- }
- return h("div", [h("Tag", { props: { color: color } }, text)]);
+ return promotionsStatusRender(h, params);
},
},
{
@@ -225,10 +296,15 @@ export default {
this.$router.push({ name: "edit-points-goods", query: { id: id } });
},
// 启用 停用积分商品
- statusChanged(id, status) {
+ statusChanged(id, status, startTime, endTime) {
let text = "";
+ let params = {};
if (status == "START") {
text = "开启";
+ params = {
+ startTime: startTime,
+ endTime: endTime,
+ };
} else if (status == "CLOSE") {
text = "关闭";
}
@@ -237,9 +313,7 @@ export default {
content: "您确认要" + text + "此积分商品?",
loading: true,
onOk: () => {
- editPointsGoodsStatus(id, {
- promotionStatus: status,
- }).then((res) => {
+ editPointsGoodsStatus(id, params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(text + "成功");
@@ -266,7 +340,7 @@ export default {
});
},
});
- }
+ },
},
mounted() {
this.init();
diff --git a/manager/src/views/promotion/seckill/addSeckill.vue b/manager/src/views/promotions/seckill/seckill-add.vue
similarity index 88%
rename from manager/src/views/promotion/seckill/addSeckill.vue
rename to manager/src/views/promotions/seckill/seckill-add.vue
index 952a4633..45aa2052 100644
--- a/manager/src/views/promotion/seckill/addSeckill.vue
+++ b/manager/src/views/promotions/seckill/seckill-add.vue
@@ -53,11 +53,7 @@
v-show="showAddPeriod"
@on-blur="addPeriodTime"
>
-
+
@@ -104,7 +98,7 @@ export default {
promotionStatus: "NEW",
},
id: this.$route.query.id, // 活动id
- periodTime: null, // 抢购时间段
+ periodTime: null, // 抢购时间段
showAddPeriod: false, // input显隐
submitLoading: false, // 添加或编辑提交状态
@@ -140,11 +134,13 @@ export default {
}
});
},
- addPeriod() { // 添加时间段显示input
+ addPeriod() {
+ // 添加时间段显示input
this.addPeriodTime();
this.showAddPeriod = true;
},
- addPeriodTime() { // 添加秒杀时间段
+ addPeriodTime() {
+ // 添加秒杀时间段
this.showAddPeriod = false;
if (
this.periodTime !== null &&
@@ -153,7 +149,8 @@ export default {
this.form.seckillPeriod.push(this.periodTime);
}
},
- removePeriodTime(event, name) { // 移除秒杀时间段
+ removePeriodTime(event, name) {
+ // 移除秒杀时间段
this.form.seckillPeriod = this.form.seckillPeriod.filter((i) => i !== name);
},
// // 申请截止时间格式化
@@ -175,8 +172,13 @@ export default {
delete this.form.updateTime;
delete this.form.endTime;
delete this.form.seckillApplyList;
+ let params = this.form;
+ params.startTime = this.$options.filters.unixToDate(this.form.startTime / 1000);
+ params.applyEndTime = this.$options.filters.unixToDate(
+ this.form.applyEndTime / 1000
+ );
// 编辑
- updateSeckill(this.form).then((res) => {
+ updateSeckill(params).then((res) => {
this.submitLoading = false;
if (res && res.success) {
this.$Message.success("编辑成功");
@@ -202,7 +204,7 @@ h4 {
line-height: 40px;
text-align: left;
}
-.ivu-form-item{
+.ivu-form-item {
margin-bottom: 30px;
}
diff --git a/manager/src/views/promotion/seckill/seckillGoods.vue b/manager/src/views/promotions/seckill/seckill-goods.vue
similarity index 100%
rename from manager/src/views/promotion/seckill/seckillGoods.vue
rename to manager/src/views/promotions/seckill/seckill-goods.vue
diff --git a/manager/src/views/promotion/seckill/setupSeckill.vue b/manager/src/views/promotions/seckill/seckill-setup.vue
similarity index 100%
rename from manager/src/views/promotion/seckill/setupSeckill.vue
rename to manager/src/views/promotions/seckill/seckill-setup.vue
diff --git a/manager/src/views/promotion/seckill/seckill.vue b/manager/src/views/promotions/seckill/seckill.vue
similarity index 62%
rename from manager/src/views/promotion/seckill/seckill.vue
rename to manager/src/views/promotions/seckill/seckill.vue
index db1b0bb7..5af20d0f 100644
--- a/manager/src/views/promotion/seckill/seckill.vue
+++ b/manager/src/views/promotions/seckill/seckill.vue
@@ -2,13 +2,29 @@
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
\ No newline at end of file
+.menu-input {
+ width: 500px;
+}
+
diff --git a/seller/src/api/promotion.js b/seller/src/api/promotion.js
index dc3ddd67..bce75905 100644
--- a/seller/src/api/promotion.js
+++ b/seller/src/api/promotion.js
@@ -60,13 +60,8 @@ export const editPintuan = (params) => {
return putRequest('/promotion/pintuan', params,{'Content-type': 'application/json'})
}
// 手动开启拼团活动
-export const openPintuan = (pintuanId, params) => {
- return putRequest(`/promotion/pintuan/open/${pintuanId}`, params)
-}
-
-// 手动关闭拼团活动
-export const closePintuan = (pintuanId) => {
- return putRequest(`/promotion/pintuan/close/${pintuanId}`)
+export const editPintuanStatus = (pintuanId, params) => {
+ return putRequest(`/promotion/pintuan/status/${pintuanId}`, params)
}
// 删除拼团活动
@@ -179,6 +174,6 @@ export const delFullDiscount = (id) => {
return deleteRequest(`/promotion/fullDiscount/${id}`)
}
// 开启、关闭满减活动
-export const updateFullDiscount = (id, promotionStatus) => {
- return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
+export const updateFullDiscount = (id, params) => {
+ return putRequest(`/promotion/fullDiscount/status/${id}`, params)
}
diff --git a/seller/src/libs/routerJson.js b/seller/src/libs/routerJson.js
index 8a5e1586..216fe8a8 100644
--- a/seller/src/libs/routerJson.js
+++ b/seller/src/libs/routerJson.js
@@ -283,8 +283,8 @@ export const result = [{
level: 2,
type: 0,
title: "满额活动",
- path: "full-cut",
- component: "promotion/fullCut/fullCut",
+ path: "full-discount",
+ component: "promotion/full-discount/full-discount",
children: null
},
{
diff --git a/seller/src/router/router.js b/seller/src/router/router.js
index 6e774975..f210ace5 100644
--- a/seller/src/router/router.js
+++ b/seller/src/router/router.js
@@ -63,7 +63,7 @@ export const otherRouter = {
path: "add-coupon",
title: "店铺优惠券",
name: "add-coupon",
- component: () => import("@/views/promotion/coupon/couponPublish.vue")
+ component: () => import("@/views/promotion/coupon/coupon-publish.vue")
},
{
path: "add-live",
@@ -81,19 +81,19 @@ export const otherRouter = {
path: "seckill-goods",
title: "限时抢购商品",
name: "seckill-goods",
- component: () => import("@/views/promotion/seckill/seckillGoods.vue")
+ component: () => import("@/views/promotion/seckill/seckill-goods.vue")
},
{
path: "pintuan-goods",
title: "拼团商品",
name: "pintuan-goods",
- component: () => import("@/views/promotion/pintuan/pintuanGoods.vue")
+ component: () => import("@/views/promotion/pintuan/pintuan-goods.vue")
},
{
- path: "new-pintuan",
+ path: "pintuan-edit",
title: "新增拼团",
- name: "new-pintuan",
- component: () => import("@/views/promotion/pintuan/newPintuan.vue")
+ name: "pintuan-edit",
+ component: () => import("@/views/promotion/pintuan/pintuan-edit.vue")
},
{
path: "order-detail",
@@ -116,10 +116,10 @@ export const otherRouter = {
import("@/views/order/after-order/reurnGoodsOrderDetail.vue")
},
{
- path: "full-cut-detail",
+ path: "full-discount-detail",
title: "添加满额活动",
- name: "full-cut-detail",
- component: () => import("@/views/promotion/fullCut/newFullCut.vue")
+ name: "full-discount-detail",
+ component: () => import("@/views/promotion/full-discount/full-discount-add.vue")
},
{
path: "export-order-deliver",
diff --git a/seller/src/utils/promotions.js b/seller/src/utils/promotions.js
new file mode 100644
index 00000000..f6d52378
--- /dev/null
+++ b/seller/src/utils/promotions.js
@@ -0,0 +1,60 @@
+
+export function promotionsStatusRender(h, params) {
+ let text = "未知",
+ color = "red";
+ if (params.row.promotionStatus == "NEW") {
+ text = "未开始";
+ color = "geekblue";
+ } else if (params.row.promotionStatus == "START") {
+ text = "已开始";
+ color = "green";
+ } else if (params.row.promotionStatus == "END") {
+ text = "已结束";
+ color = "red";
+ } else if (params.row.promotionStatus == "CLOSE") {
+ text = "已关闭";
+ color = "red";
+ }
+ return h("div", [
+ h(
+ "Tag",
+ {
+ props: {
+ color: color,
+ },
+ },
+ text
+ ),
+ ]);
+}
+
+export function promotionsScopeTypeRender(h, params) {
+ let text = "未知",
+ color = "red";
+ if (params.row.scopeType == "ALL") {
+ text = "全品类";
+ color = "default";
+ } else if (params.row.scopeType == "PORTION_GOODS_CATEGORY") {
+ text = "商品分类";
+ color = "yellow";
+ } else if (params.row.scopeType == "PORTION_SHOP_CATEGORY") {
+ text = "店铺分类";
+ color = "pink";
+ } else if (params.row.scopeType == "PORTION_GOODS") {
+ text = "指定商品";
+ color = "magenta";
+ }
+ return h("div", [
+ h(
+ "Tag",
+ {
+ props: {
+ color: color,
+ },
+ },
+ text
+ ),
+ ]);
+}
+
+
diff --git a/seller/src/views/promotion/coupon/couponPublish.vue b/seller/src/views/promotion/coupon/coupon-publish.vue
similarity index 77%
rename from seller/src/views/promotion/coupon/couponPublish.vue
rename to seller/src/views/promotion/coupon/coupon-publish.vue
index f6eac828..6eebbbdf 100644
--- a/seller/src/views/promotion/coupon/couponPublish.vue
+++ b/seller/src/views/promotion/coupon/coupon-publish.vue
@@ -6,10 +6,24 @@
基本信息
-
+
-
+
-
+
请输入0-10之间数字,可以输入一位小数
-
+
-
+
如果发放数量为0时,则代表不限制发放数量
使用限制