From c79049443a315d5d1d04702dbf5eff31579b36f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Mon, 11 Nov 2024 10:39:45 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E5=95=86=E5=93=81=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=93=E5=AD=98=20=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/shop.js | 11 ++ src/views/product/add_shop.vue | 19 ++- src/views/product/index.vue | 3 - src/views/user_manage/active_list.vue | 29 +++-- .../user_manage/components/addActive.vue | 112 ++++++++++++++---- .../user_manage/components/downloadQR.vue | 3 +- 6 files changed, 137 insertions(+), 40 deletions(-) diff --git a/src/api/shop.js b/src/api/shop.js index 79ed2c8..55e9508 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -417,6 +417,17 @@ export function modityActivate(data) { }); } +/** + * 新增、修改活动 新的! + * @returns + */ +export function storageupActivate(data) { + return request({ + url: `/shop/storage/upActivate`, + method: "post", + data + }); +} /** * 活动列表 * @returns diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index 2587310..9fb6b69 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -437,7 +437,7 @@ export default { Editor, addImg, }, - name:'add_shop', + name: 'add_shop', data() { const validatordateUsed = (rule, value, callback) => { if (!this.form.notices.dateUsed) { @@ -602,17 +602,32 @@ export default { batchNumberForm: { batchNumber: 0, }, + routequery: '' }; }, mounted() { this.tbShopUnit(); this.tbShopCategoryGet(); this.changeTypeEnum(0); - if (this.$route.query.goods_id) { this.tbProductGetDetail(); } }, + watch: { + // 监听路由对象中的参数变化 + $route(to, from) { + console.log(to.query.goods_id) + if (to.query.goods_id) { + if (this.routequery == to.query.goods_id) { + return false; + } else { + this.tbProductGetDetail(); + } + this.routequery = to.query.goods_id + } + + }, + }, methods: { uploadImgSucess(res, item) { console.log(res); diff --git a/src/views/product/index.vue b/src/views/product/index.vue index c9ff079..3499939 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -298,11 +298,9 @@ export default { } }, async mounted() { - console.log(this.$route.query.productId, 'tiaoshi1') if (this.$route.query.productId) { this.query.productId = this.$route.query.productId } - console.log(this.query) await this.tbShopCategoryGet() await this.getTableData() @@ -533,7 +531,6 @@ export default { }) }) - console.log(res); this.tableData.loading = false this.tableData.data = res.content diff --git a/src/views/user_manage/active_list.vue b/src/views/user_manage/active_list.vue index 2d0dc88..8badef1 100644 --- a/src/views/user_manage/active_list.vue +++ b/src/views/user_manage/active_list.vue @@ -19,24 +19,26 @@ 下载会员充值二维码
- 允许充值自定义金额: + 允许充值自定义金额:
- - - - + + + - + + --> + + @@ -65,7 +67,7 @@ import handselTypes from './handselTypes' import addActive from './components/addActive' import QR from './components/downloadQR.vue' -import { findActivate, modityActivate } from '@/api/shop' +import { findActivate, storageupActivate } from '@/api/shop' import { tbShopInfo, tbShopInfoPut } from "@/api/user"; import dayjs from 'dayjs' export default { @@ -107,8 +109,9 @@ export default { try { this.tableData.loading = true const data = { ...row } - data.status = e - await modityActivate(data) + data.isUseCoupon = e + console.log(data.isUseCoupon) + await storageupActivate(data) this.getTableData() } catch (error) { console.log(error) @@ -151,7 +154,7 @@ export default { } console.log(this.shopInfo); - + } catch (error) { console.log(error) } diff --git a/src/views/user_manage/components/addActive.vue b/src/views/user_manage/components/addActive.vue index 42ace2d..45bee7d 100644 --- a/src/views/user_manage/components/addActive.vue +++ b/src/views/user_manage/components/addActive.vue @@ -2,7 +2,23 @@
- + + + + + + + --> + + + - - + + - + + + +
- 添加商品 + 添加优惠劵
@@ -53,7 +82,9 @@ \ No newline at end of file diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index f6c69d5..57a05a4 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -697,6 +697,17 @@
@@ -1406,6 +1417,7 @@ import orderNote from "./components/note.vue"; import chooseDinersNumber from "./components/choose-diners-number.vue"; import returnCart from "./components/return-cart.vue"; import moneyKeyboard from "./components/money-keyboard.vue"; +import caiAdd from "./components/popup-linshiCai.vue"; import dayjs from "dayjs"; import { tbShopInfo } from "@/api/user"; import { hasPermission } from "@/utils/limits.js"; @@ -1456,6 +1468,7 @@ import { $status } from "@/utils/table.js"; let $originTableList = []; export default { components: { + caiAdd, quansPop, returnCart, chooseUser, @@ -2130,10 +2143,13 @@ export default { this.open(this.$route.query); }, methods: { + lingshicaiShow() { + this.$refs.refPopAddCai.open(); + }, delQuan(row) { - const index=this.quansSelArr.findIndex(v=>v.id==row.id); + const index = this.quansSelArr.findIndex((v) => v.id == row.id); console.log(index); - if(index!=-1){ + if (index != -1) { this.quansSelArr.splice(index, 1); } }, @@ -2183,10 +2199,13 @@ export default { } }, showQuan() { - this.$refs.refQuans.open({ - id: this.createOrder.data.id, - memberId: this.createOrder.data.memberId || this.vipUser.id, - },[...this.quansSelArr]); + this.$refs.refQuans.open( + { + id: this.createOrder.data.id, + memberId: this.createOrder.data.memberId || this.vipUser.id, + }, + [...this.quansSelArr] + ); }, quansConfirm(e) { console.log(e); @@ -2852,8 +2871,10 @@ export default { payAfter: this.payAfter, orderld: this.order.orderId, }); - } - await this.getOrderData(res?{orderId: res.id}:{orderId:this.createOrder.data.id}); + } + await this.getOrderData( + res ? { orderId: res.id } : { orderId: this.createOrder.data.id } + ); res = true; } catch (error) {} if (!res) { @@ -3014,8 +3035,8 @@ export default { return; } if (key === "returnCart") { - const selGoods=this.order.old.list[this.order.old.selIndex]; - this.refToggle("refReturnCart", true,selGoods); + const selGoods = this.order.old.list[this.order.old.selIndex]; + this.refToggle("refReturnCart", true, selGoods); } }, //选择挂单确认 @@ -3894,6 +3915,13 @@ export default { border-radius: 4px; margin-left: 12px; } +.lingshicai { + border: 1px solid #dddfe6; + display: flex; + flex-direction: column; + justify-content: center; + align-content: center; +} /* 针对所有input type="number" */ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { From fea219ee4204142709a19fa0c4ff7564091ce6ea Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Tue, 12 Nov 2024 09:40:23 +0800 Subject: [PATCH 04/31] =?UTF-8?q?=E9=99=90=E5=88=B6=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E3=80=81=E6=95=B0=E9=87=8F=E5=8F=AA=E8=83=BD=E8=BE=93=E6=AD=A3?= =?UTF-8?q?=E6=95=B4=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/coupon_manage/add_coupon.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/coupon_manage/add_coupon.vue b/src/views/coupon_manage/add_coupon.vue index 8ab7da6..93ead75 100644 --- a/src/views/coupon_manage/add_coupon.vue +++ b/src/views/coupon_manage/add_coupon.vue @@ -11,11 +11,11 @@
- + - + @@ -79,7 +79,7 @@ /> - + @@ -96,10 +96,10 @@ - - + + - + From 8f8cbae221770813115f9fe81ff7605856c97427 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Tue, 12 Nov 2024 09:41:46 +0800 Subject: [PATCH 05/31] =?UTF-8?q?=E9=99=90=E5=88=B6=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E3=80=81=E6=95=B0=E9=87=8F=E5=8F=AA=E8=83=BD=E8=BE=93=E6=AD=A3?= =?UTF-8?q?=E6=95=B4=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/coupon_manage/add_coupon.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/coupon_manage/add_coupon.vue b/src/views/coupon_manage/add_coupon.vue index 93ead75..a527dd1 100644 --- a/src/views/coupon_manage/add_coupon.vue +++ b/src/views/coupon_manage/add_coupon.vue @@ -105,7 +105,7 @@ - 全额满可用 + 全额满可用
From e5ba63d8aa8cd1e6052488239500a065543a1afc Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Tue, 12 Nov 2024 10:11:33 +0800 Subject: [PATCH 06/31] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=8E=92=E5=88=97=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/components/addGroup.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/product/components/addGroup.vue b/src/views/product/components/addGroup.vue index 3bd718f..4840106 100644 --- a/src/views/product/components/addGroup.vue +++ b/src/views/product/components/addGroup.vue @@ -27,12 +27,19 @@ 禁用 - + 启用 禁用 + + + 默认 + 价格由高到低 + 销量由高到低 + + + + + + + + + + + + + +
+ + + 取 消 + 确 定 + +
+ + + + + \ No newline at end of file diff --git a/src/views/user_manage/components/addActive.vue b/src/views/user_manage/components/addActive.vue index 45bee7d..0aee98e 100644 --- a/src/views/user_manage/components/addActive.vue +++ b/src/views/user_manage/components/addActive.vue @@ -52,18 +52,18 @@
- +
- + 添加优惠劵
-
{{ item.name }}
- +
{{ item.title }}
+ 删除
@@ -75,7 +75,7 @@ 确 定 - +
@@ -83,12 +83,10 @@ + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/quans.vue b/src/views/tool/Instead/components/quans.vue index 9cb1ebd..2de1167 100644 --- a/src/views/tool/Instead/components/quans.vue +++ b/src/views/tool/Instead/components/quans.vue @@ -63,11 +63,19 @@ @cell-click="productCouponClick" empty-text="无可用商品券" :data="quans.productCoupon" - tooltip-effect="dark" style="width: 100%" - @selection-change="productCouponChange" > - + + + @@ -90,13 +98,13 @@
- + - + @@ -147,9 +169,22 @@ -
- 抵扣: - {{ AllCouponPrice }} +
+
+
+ 抵扣金额: + ¥{{ AllCouponPrice }} +
+
+ 支付金额: + ¥{{ payPrice }} +
+ ¥{{ orderPrice }} +
@@ -165,11 +200,21 @@