diff --git a/src/views/Commodity/MerchandiseCenter.vue b/src/views/Commodity/MerchandiseCenter.vue
index 33932ad..6baf5f4 100644
--- a/src/views/Commodity/MerchandiseCenter.vue
+++ b/src/views/Commodity/MerchandiseCenter.vue
@@ -3,8 +3,8 @@
- type
- type
+
+
@@ -86,7 +86,8 @@
- {{ scope.row.isShelvesisShelves }}
+ 上架
+ 下架
@@ -98,8 +99,9 @@
编辑
-
- {{ status }}
+
+ 下架
+ 上架
{
editForm.value = row;
};
const handleOff = (index: number, row: any) => {
- console.log(row)
- if (row.isShelves === '上架') {
- 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('您确定要删除该商品吗?');
@@ -329,7 +330,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: '获取数据失败',