From 5d3b86a4d0032836c782e5e1319179eced5e5647 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 23 一月 2026 17:35:24 +0800
Subject: [PATCH] 经销商管理
---
admin/src/views/business/goodsLabels.vue | 54 +++++++++++++++++++-----------------------------------
1 files changed, 19 insertions(+), 35 deletions(-)
diff --git a/admin/src/views/business/goodsLabels.vue b/admin/src/views/business/goodsLabels.vue
index 3d5adef..b738d43 100644
--- a/admin/src/views/business/goodsLabels.vue
+++ b/admin/src/views/business/goodsLabels.vue
@@ -5,23 +5,6 @@
<el-form-item label="鍒嗙被鍚嶇О" prop="name">
<el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ垎绫诲悕绉�" @keypress.enter.native="search"></el-input>
</el-form-item>
-<!-- <el-form-item label="鎵�灞炴澘鍧�" prop="module">
- <el-select
- v-model="searchForm.module"
- placeholder="璇烽�夋嫨鎵�灞炴澘鍧�"
- >
- <el-option
- :key="0"
- :value="0"
- label="骞冲彴鍟嗗煄"
- ></el-option>
- <el-option
- :key="1"
- :value="1"
- label="鍜栬眴鍟嗗煄"
- ></el-option>
- </el-select>
- </el-form-item>-->
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
<el-button @click="reset">閲嶇疆</el-button>
@@ -30,8 +13,8 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar" v-permissions="['business:productlabel:create', 'business:productlabel:delete']">
- <li><el-button type="primary" @click="$refs.operaProductLabelWindow.open('鏂板缓鍟嗗搧鏍囩淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:productlabel:create']">鏂板缓</el-button></li>
- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">鍒犻櫎</el-button></li>
+ <li><el-button type="primary" @click="$refs.operaProductLabelWindow.open('鏂板缓鍟嗗搧鍒嗙被')" icon="el-icon-plus" v-permissions="['business:productlabel:create']">鏂板缓</el-button></li>
+ <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">鍒犻櫎</el-button></li>
</ul>
<el-table
v-loading="isWorking.search"
@@ -41,12 +24,12 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
- <el-table-column prop="module" label="鎵�灞炴澘鍧�" min-width="100px">
+ <el-table-column prop="imgurlfull" label="鍥炬爣" align="center" min-width="80px">
<template slot-scope="{row}">
- {{ row.module==0?'骞冲彴鍟嗗煄':'鍜栬眴鍟嗗煄' }}
+ <el-image style="width: 50px;height: 50px;" v-if="row.imgurlfull && row.imgurlfull!=''" :src="row.imgurlfull" :preview-src-list="[row.imgurlfull]"></el-image>
</template>
</el-table-column>
- <el-table-column prop="name" label="鍒嗙被鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="鍟嗗搧鍒嗙被" min-width="100px"></el-table-column>
<el-table-column prop="sortnum" label="鎺掑簭鐮�(鍗囧簭)" min-width="100px"></el-table-column>
<el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="100px"></el-table-column>
<el-table-column prop="status" label="鐘舵��" min-width="100px">
@@ -68,8 +51,8 @@
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaProductLabelWindow.open('缂栬緫鍟嗗搧鏍囩淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:productlabel:update']">缂栬緫</el-button>
- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">鍒犻櫎</el-button>
+ <el-button type="text" @click="$refs.operaProductLabelWindow.open('缂栬緫鍟嗗搧鍒嗙被', row)" icon="el-icon-edit" v-permissions="['business:productlabel:update']">缂栬緫</el-button>
+ <el-button type="text" style="color: red;" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:productlabel:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -90,6 +73,7 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaGoodsLabelsWindow from '@/components/business/OperaGoodsLabelsWindow'
+import {updateStatusById} from "@/api/business/labels";
export default {
name: 'ProductLabel',
extends: BaseTable,
@@ -107,7 +91,7 @@
},
created () {
this.config({
- module: '鍟嗗搧鏍囩淇℃伅琛�',
+ module: '鍟嗗搧鍒嗙被淇℃伅琛�',
api: '/business/labels',
'field.id': 'id',
'field.main': 'id'
@@ -116,16 +100,16 @@
},
methods: {
statusChange (row) {
- this.api.updateById({ id: row.id, status: row.status })
- .then(() => {
- this.$message.success('鎿嶄綔鎴愬姛')
- })
- .catch(e => {
- this.$message.error('鎿嶄綔鎴愬姛')
- })
- .then(() => {
- this.handlePageChange()
- })
+ this.api.updateStatusById({ id: row.id, status: row.status })
+ .then(() => {
+ this.$message.success('鎿嶄綔鎴愬姛')
+ })
+ .catch(e => {
+ this.$message.error('鎿嶄綔鎴愬姛')
+ })
+ .then(() => {
+ this.handlePageChange()
+ })
}
}
}
--
Gitblit v1.9.3