|
@@ -52,7 +52,7 @@
|
|
|
<el-table-column prop="addTime" label="添加时间" align="center" width="300" />
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-button type="primary" size="mini" @click="handleTagsList(row.id)">标签列表</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="handleTagsList(row)">标签列表</el-button>
|
|
|
<el-button v-permission="'tag:list:del'" type="danger" size="mini" @click="handleDeleteSupper(row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -110,6 +110,15 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <!-- 页码 -->
|
|
|
+ <pagination
|
|
|
+ :total="shopListTotal"
|
|
|
+ :page-sizes="[100, 200]"
|
|
|
+ :page-size="100"
|
|
|
+ :page.sync="shopListQuery.pageNum"
|
|
|
+ :limit.sync="shopListQuery.pageSize"
|
|
|
+ @pagination="fetchShopLabelShopList"
|
|
|
+ />
|
|
|
<div slot="footer">
|
|
|
<el-button @click="addSupplierDialog = false">取 消</el-button>
|
|
|
<el-button type="primary" :disabled="disabled" @click="handleAddTagConfirm(supplierRadio)">确 定</el-button>
|
|
@@ -136,13 +145,15 @@ export default {
|
|
|
},
|
|
|
list: [],
|
|
|
total: 0,
|
|
|
+ shopListTotal: 0,
|
|
|
shopListQuery: {
|
|
|
pageNum: 1, // 页码
|
|
|
pageSize: 200, // 页面数据数
|
|
|
shopId: '', // 供应商ID
|
|
|
name: ''// 供应商公司名称
|
|
|
},
|
|
|
- supplierRadio: null
|
|
|
+ supplierRadio: null,
|
|
|
+ isAddSupplier: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -186,9 +197,11 @@ export default {
|
|
|
},
|
|
|
// 获取所有供应商列表
|
|
|
async fetchShopLabelShopList() {
|
|
|
+ this.supplierList = []
|
|
|
try {
|
|
|
const res = await fetchShopLabelShopList(this.shopListQuery)
|
|
|
this.supplierList = res.data.results
|
|
|
+ this.shopListTotal = res.data.totalRecord
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
}
|
|
@@ -196,7 +209,9 @@ export default {
|
|
|
// 确定选择供应商
|
|
|
async handleAddTagConfirm(shopId) {
|
|
|
try {
|
|
|
+ if (this.isAddSupplier) { return }
|
|
|
this.addSupplierDialog = false
|
|
|
+ this.isAddSupplier = true
|
|
|
await importShopRelevance({ shopId: shopId })
|
|
|
this.$message.success({
|
|
|
message: '添加供应商成功',
|
|
@@ -204,12 +219,15 @@ export default {
|
|
|
center: true,
|
|
|
duration: 2000,
|
|
|
onClose: () => {
|
|
|
+ this.isAddSupplier = false
|
|
|
this.shopListQuery.name = ''
|
|
|
this.shopListQuery.shopId = ''
|
|
|
+ this.supplierRadio = null
|
|
|
this.getList()
|
|
|
}
|
|
|
})
|
|
|
} catch (error) {
|
|
|
+ this.isAddSupplier = false
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
@@ -236,9 +254,9 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
- // 查看详情
|
|
|
- handleTagsList(id) {
|
|
|
- this.$router.push({ path: '/library/supplierTag/tagList', query: { relevanceId: id }})
|
|
|
+ // 标签列表
|
|
|
+ handleTagsList(row) {
|
|
|
+ this.$router.push({ path: '/library/supplierTag/tagList', query: { shopId: row.shopId, relevanceId: row.id }})
|
|
|
}
|
|
|
}
|
|
|
}
|