From 1e408eb8ae9e02d3c7697468cfb6c2a7b4167571 Mon Sep 17 00:00:00 2001 From: paulGao Date: Thu, 23 Dec 2021 17:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86=E7=AB=AF?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=95=86=E5=93=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/goodsDetail/ShowGoods.vue | 2 +- manager/src/api/promotion.js | 2 +- .../full-discount/full-discount-detail.vue | 2 +- .../points-goods/points-goods-edit.vue | 66 +-- .../promotions/points-goods/points-goods.vue | 14 +- .../goods/goods-seller/goodsOperationSec.vue | 494 ++++++++++++------ 6 files changed, 378 insertions(+), 202 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 2bff47f4..6f9b4f09 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -224,7 +224,7 @@ export default { count: 1, // 商品数量 imgIndex: 0, // 展示图片下标 currentSelceted: [], // 当前商品sku - imgList: [{url:''}], // 商品图片列表 + imgList: [{ url: "" }], // 商品图片列表 skuDetail: this.detail.data, // sku详情 goodsSpecList: this.detail.specs, // 商品spec promotionMap: { diff --git a/manager/src/api/promotion.js b/manager/src/api/promotion.js index 6a33c599..c3e34f61 100644 --- a/manager/src/api/promotion.js +++ b/manager/src/api/promotion.js @@ -239,7 +239,7 @@ export const updatePointsGoods = params => { }; // 修改积分商品状态 export const editPointsGoodsStatus = (id, params) => { - return putRequest(`/promotion/pointsGoods/${id}`, params); + return putRequest(`/promotion/pointsGoods/status/${id}`, params); }; // 删除积分商品 export const deletePointsGoodsStatus = id => { diff --git a/manager/src/views/promotions/full-discount/full-discount-detail.vue b/manager/src/views/promotions/full-discount/full-discount-detail.vue index a595b0d0..63ab1a36 100644 --- a/manager/src/views/promotions/full-discount/full-discount-detail.vue +++ b/manager/src/views/promotions/full-discount/full-discount-detail.vue @@ -165,7 +165,7 @@
- +
diff --git a/manager/src/views/promotions/points-goods/points-goods-edit.vue b/manager/src/views/promotions/points-goods/points-goods-edit.vue index 31b8c7b8..f1c345b6 100644 --- a/manager/src/views/promotions/points-goods/points-goods-edit.vue +++ b/manager/src/views/promotions/points-goods/points-goods-edit.vue @@ -15,14 +15,14 @@
{{ form.goodsSku.storeName }}
-
{{ form.goodsSku.price | unitPrice('¥') }}
+
{{ form.goodsSku.price | unitPrice("¥") }}
{{ form.goodsSku.quantity }}
@@ -65,36 +62,21 @@ style="width: 260px" /> - + - - - - @@ -134,11 +116,13 @@ export default { submitLoading: false, // 添加或编辑提交状态 formRule: { settlementPrice: [{ required: true, message: "请填写结算价格" }], - pointsGoodsCategoryId: [ - { required: true, message: "请选择积分商品分类" }, - ], + pointsGoodsCategoryId: [{ required: true, message: "请选择积分商品分类" }], points: [{ required: true, message: "请填写兑换积分" }], - startTime: [{ required: true, message: "请填写活动开始时间" }], + }, + options: { + disabledDate(date) { + return date && date.valueOf() < Date.now() - 86400000; + }, }, }; }, @@ -153,9 +137,7 @@ export default { // 关闭当前页面 closeCurrentPage() { this.$store.commit("removeTag", "edit-points-goods"); - localStorage.pageOpenedList = JSON.stringify( - this.$store.state.app.pageOpenedList - ); + localStorage.pageOpenedList = JSON.stringify(this.$store.state.app.pageOpenedList); this.$router.go(-1); }, // 获取商品数据 @@ -164,6 +146,10 @@ export default { if (res.success) { let data = res.result; this.form = data; + data.rangeTime = []; + if (data.startTime && data.endTime) { + data.rangeTime.push(new Date(data.startTime), new Date(data.endTime)); + } } }); }, @@ -176,12 +162,8 @@ export default { handleSubmit() { this.$refs.form.validate((valid) => { if (valid) { - 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.rangeTime[0] / 1000); + const end = this.$options.filters.unixToDate(this.form.rangeTime[1] / 1000); this.form.startTime = start; this.form.endTime = end; this.submitLoading = true; diff --git a/manager/src/views/promotions/points-goods/points-goods.vue b/manager/src/views/promotions/points-goods/points-goods.vue index ead2b46f..7fd5a72a 100644 --- a/manager/src/views/promotions/points-goods/points-goods.vue +++ b/manager/src/views/promotions/points-goods/points-goods.vue @@ -105,7 +105,7 @@ diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index fd05a805..70e0e9da 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -1,29 +1,57 @@