fix: 去除银行卡支付和刷卡支付方式,通知中心增加订阅消息编辑,修复店铺信息页面运行时为数字类型接受字符串数字警告

This commit is contained in:
YeMingfei666 2025-03-14 14:14:05 +08:00
parent d847911a2e
commit 57ea2842c1
5 changed files with 37 additions and 56 deletions

View File

@ -42,6 +42,14 @@ const Api = {
params
});
},
//配置订阅消息类型
config(data: any) {
return request<any>({
url: `${baseURL}/config`,
method: "post",
data
});
},
};
export default Api;

View File

@ -39,7 +39,7 @@
<el-pagination
:total="tableData.total"
@size-change="handleSizeChange"
:current-page="tableData.page + 1"
:current-page="tableData.page"
:page-size="tableData.size"
@current-change="paginationChange"
layout="total, sizes, prev, pager, next, jumper"

View File

@ -3,7 +3,7 @@
<el-button v-if="url" type="primary" @click="dialogVisible = true" style="margin-bottom: 28px">
订阅消息
</el-button>
<el-dialog title="提示" v-model="dialogVisible" width="30%" :before-close="handleClose">
<el-dialog title="提示" v-model="dialogVisible" width="30%">
<div style="width: 100%; text-align: center">
<el-image style="width: 200px; height: 200px" :src="url"></el-image>
</div>
@ -35,41 +35,23 @@
</template>
</el-table-column>
<el-table-column label="昵称" prop="nickname"></el-table-column>
<el-table-column label="商品库存预警" prop="createdAt">
<el-table-column label="订阅类型">
<template v-slot="scope">
<el-switch
v-model="scope.row.proState"
:active-value="1"
:inactive-value="0"
@change="changeHot(scope.row.proState, 0, scope.row.openId)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="耗材库存预警" prop="createdAt">
<template v-slot="scope">
<el-switch
v-model="scope.row.conState"
:active-value="1"
:inactive-value="0"
@change="changeHot(scope.row.conState, 1, scope.row.openId)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作商品" prop="createdAt">
<template v-slot="scope">
<el-switch
v-model="scope.row.opeState"
:active-value="1"
:inactive-value="0"
@change="changeHot(scope.row.opeState, 2, scope.row.openId)"
></el-switch>
<el-checkbox-group
v-model="scope.row.typeInfo"
@change="typeInfoChange($event, scope.row)"
>
<el-checkbox label="耗材推送" value="con"></el-checkbox>
<el-checkbox label="商品推送" value="pro"></el-checkbox>
<el-checkbox label="操作预警" value="ope"></el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<template v-slot="scope">
<el-popconfirm title="确定解绑吗?" @confirm="delTableHandle(scope.row.openId)">
<template #reference>
<el-button type="text">解绑</el-button>
<el-button link type="primary">解绑</el-button>
</template>
</el-popconfirm>
</template>
@ -79,6 +61,7 @@
<div class="head-container">
<el-pagination
:total="tableData.total"
@size-change="handleSizeChange"
:current-page="tableData.page"
:page-size="tableData.size"
@current-change="paginationChange"
@ -90,6 +73,7 @@
<script>
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);
}

View File

@ -103,7 +103,7 @@
:min="0"></el-input-number>
</el-form-item> -->
<el-form-item label="店铺经度" prop="provinces">
<el-row gutter="6">
<el-row :gutter="6">
<el-col :span="9" v-if="form.provinces">
<el-input :value="`${form.provinces}-${form.cities}-${form.districts}`" disabled />
</el-col>

View File

@ -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: [