From 57ea2842c15fa3dcef9ef5ad1a6130165bb1e81e Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 14 Mar 2025 14:14:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E9=93=B6=E8=A1=8C?= =?UTF-8?q?=E5=8D=A1=E6=94=AF=E4=BB=98=E5=92=8C=E5=88=B7=E5=8D=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E6=96=B9=E5=BC=8F=EF=BC=8C=E9=80=9A=E7=9F=A5=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=A2=9E=E5=8A=A0=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E8=BF=90=E8=A1=8C=E6=97=B6?= =?UTF-8?q?=E4=B8=BA=E6=95=B0=E5=AD=97=E7=B1=BB=E5=9E=8B=E6=8E=A5=E5=8F=97?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=95=B0=E5=AD=97=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/shopMsgPush.ts | 8 ++ .../consumables/components/stockHistory.vue | 2 +- .../shop/config/components/notifications.vue | 76 ++++++------------- src/views/shop/config/components/shopInfo.vue | 2 +- .../system-setting/pay-types/config/config.ts | 5 +- 5 files changed, 37 insertions(+), 56 deletions(-) diff --git a/src/api/account/shopMsgPush.ts b/src/api/account/shopMsgPush.ts index de815ab..d43cd60 100644 --- a/src/api/account/shopMsgPush.ts +++ b/src/api/account/shopMsgPush.ts @@ -42,6 +42,14 @@ const Api = { params }); }, + //配置订阅消息类型 + config(data: any) { + return request({ + url: `${baseURL}/config`, + method: "post", + data + }); + }, }; export default Api; diff --git a/src/views/inventory/consumables/components/stockHistory.vue b/src/views/inventory/consumables/components/stockHistory.vue index c07e2a0..4fa22c0 100644 --- a/src/views/inventory/consumables/components/stockHistory.vue +++ b/src/views/inventory/consumables/components/stockHistory.vue @@ -39,7 +39,7 @@ 订阅消息 - +
@@ -35,41 +35,23 @@ - + - - - - - - @@ -79,6 +61,7 @@
import shopMsgPushApi from "@/api/account/shopMsgPush"; +import { ElMessage } from "element-plus"; export default { data() { return { @@ -97,23 +81,16 @@ export default { tableData: { data: [], page: 1, - size: 30, + size: 10, loading: false, total: 0, }, - alldata: { - allState: 0, - conState: 0, - opeState: 0, - stockState: 0, - }, url: "", dialogVisible: false, }; }, mounted() { this.getTableData(); - this.getlist(); this.getsubQrCode(); }, methods: { @@ -136,12 +113,7 @@ export default { }); this.url = res; }, - async getlist() { - let res = await state({ - shopId: localStorage.getItem("shopId"), - }); - this.alldata = res; - }, + async changeEvent(state, type) { let res = await shopState({ shopId: localStorage.getItem("shopId"), @@ -150,18 +122,20 @@ export default { }); }, // 设置消息推送 - async changeHot(row, index, openId) { + async typeInfoChange(typeInfo, row) { // index 0商品库存 1耗材 2操作商品 let obj = { - shopId: localStorage.getItem("shopId"), - type: index, - state: row, - openId, + typeInfo, + id: row.id, }; - let res = await msginfo(obj); - this.$message.success("修改成功!"); + let res = await shopMsgPushApi.config(obj); + ElMessage.success("修改成功!"); this.getTableData(); }, + handleSizeChange(val) { + this.tableData.size = val; + this.tbProductStockDetailStock(); + }, // 分页回调 paginationChange(e) { this.tableData.page = e; @@ -176,7 +150,7 @@ export default { }); this.tableData.loading = false; this.tableData.data = res.records; - this.tableData.total = res.total; + this.tableData.total = res.totalRow * 1; } catch (error) { console.log(error); } diff --git a/src/views/shop/config/components/shopInfo.vue b/src/views/shop/config/components/shopInfo.vue index b3a0e8a..da502bd 100644 --- a/src/views/shop/config/components/shopInfo.vue +++ b/src/views/shop/config/components/shopInfo.vue @@ -103,7 +103,7 @@ :min="0"> --> - + diff --git a/src/views/system-setting/pay-types/config/config.ts b/src/views/system-setting/pay-types/config/config.ts index 2896fdb..2d3661d 100644 --- a/src/views/system-setting/pay-types/config/config.ts +++ b/src/views/system-setting/pay-types/config/config.ts @@ -10,12 +10,11 @@ const options: optionObject = { payType: [ { label: "现金", value: "cash" }, { label: "微信", value: "weixin" }, - { label: "银行卡", value: "bank" }, + // { label: "银行卡", value: "bank" }, { label: "会员支付", value: "member-account" }, { label: "支付宝", value: "alipay" }, - { label: "刷卡", value: "deposit" }, + // { label: "刷卡", value: "deposit" }, { label: "挂单", value: "arrears" }, - { label: "刷卡", value: "deposit" }, { label: "自定义", value: "virtual" }, ], isIdeal: [