【新增】管理SKU页面

This commit is contained in:
yanran200830
2024-10-18 13:37:05 +08:00
parent 4d8b597abf
commit 90a3e60e76
5 changed files with 277 additions and 19 deletions

View File

@@ -8,7 +8,7 @@
<template slot="content">
<ai-search-bar>
<template #left>
<el-button type="primary" @click="toAdd">添加</el-button>
<el-button type="primary" size="small" @click="toAdd">添加</el-button>
</template>
<template #right>
</template>
@@ -21,11 +21,12 @@
:size.sync="search.size"
style="margin-top: 8px;"
@getList="getList">
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
<el-table-column slot="options" label="操作" align="center" fixed="right" width="220px">
<template v-slot="{ row }">
<div class="table-options">
<el-button type="text" @click="collection(row.id, row.isFavorite)">{{ row.isFavorite === '0' ? '收藏' : '取消收藏' }}</el-button>
<el-button type="text" @click="toDetail(row.url)">详情</el-button>
<el-button type="text" @click="toAddSku(row.url)">添加SKU</el-button>
<el-button type="text" @click="toAdd(row.url)">编辑</el-button>
<el-button type="text" @click="toDetail(row.url)">删除</el-button>
</div>
</template>
</el-table-column>
@@ -42,23 +43,25 @@
return {
colConfigs: [
{ prop: 'name', label: '模板名称', align: 'left' },
{ prop: 'createTime', label: '绑定SKU数量', align: 'center' },
{ prop: 'count', label: '绑定SKU数量', align: 'center' },
{ prop: 'createTime', label: '创建时间', align: 'center' },
],
tableData: [],
tableData: [
{
name: '电池',
count: 2
}
],
total: 0,
search: {
current: 1,
size: 10,
categoryId: ''
},
cateList: [],
isFavorite: 0
size: 10
}
}
},
created () {
this.getList()
// this.getList()
},
methods: {
@@ -66,17 +69,26 @@
this.$router.push('/addLabelsTemplate')
},
toAddSku () {
this.$router.push('/skuManage')
},
getList () {
console.log(this.tableData)
this.$http.post('/api/learning/pluginPage', null, {
params: {
...this.search
}
}).then(res => {
if (res.code === 0) {
this.tableData = res.data.records
this.total = res.data.total
// this.tableData = res.data.records
// this.total = res.data.total
}
})
},
onConfirm () {
}
}
}