From 86fa12d792109341a73ed71d5a701aa47b24a6c9 Mon Sep 17 00:00:00 2001
From: sa_10_0 <2492740167@qq.com>
Date: Thu, 31 Oct 2024 18:26:29 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Commodity/MerchandiseCenter.vue | 28 ++++++++++++-----------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/views/Commodity/MerchandiseCenter.vue b/src/views/Commodity/MerchandiseCenter.vue
index e891704..e5a454b 100644
--- a/src/views/Commodity/MerchandiseCenter.vue
+++ b/src/views/Commodity/MerchandiseCenter.vue
@@ -3,8 +3,8 @@
- type
- type
+
+
@@ -85,7 +85,8 @@
- {{ scope.row.isShelvesisShelves }}
+ 上架
+ 下架
@@ -97,8 +98,9 @@
编辑
-
- {{scope.row.attribute}}
+
+ 下架
+ 上架
{
editForm.value = row;
};
const handleOff = (index: number, row: any) => {
- if (row.attribute === '上架') {
- row.isShelves = '上架';
- row.attribute = '下架';
- } else if (row.attribute === '下架') {
- row.isShelves = '下架';
- row.attribute = '上架';
+ console.log()
+ if (row.isShelves === 0) {
+ row.isShelves = 1;//0下架,1上架
+ console.log(row.isShelves)
+ } else if (row.isShelves ===1) {
+ row.isShelves = 0;
}
-};
+}
const handleDelete = (index: number, row: any) => {
const confirmDelete = window.confirm('您确定要删除该商品吗?');
@@ -325,7 +327,7 @@ const getGoodList = async () => {
console.log(res.data)
if (res.data.code === 1) {
tableData.value = res.data.data.records;
- total.value = parseInt(res.data.data.total)
+ total.value = parseInt(res.data.data.total)//总数据量,用于分页
} else {
ElMessage({
message: '获取数据失败',