From 34437176cfbc2dc30f786601f5abf27d605e2c15 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 13 四月 2026 20:17:20 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/gtzxinglijicun
---
admin/src/views/business/baggageType.vue | 96 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 96 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/business/baggageType.vue b/admin/src/views/business/baggageType.vue
new file mode 100644
index 0000000..b210bae
--- /dev/null
+++ b/admin/src/views/business/baggageType.vue
@@ -0,0 +1,96 @@
+<template>
+ <TableLayout :permissions="['business:category:query']">
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="鍚嶇О" prop="name">
+ <el-input v-model="searchForm.name" clearable placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <template v-slot:table-wrap>
+ <ul class="toolbar">
+ <li><el-button type="primary" @click="$refs.operaGoodsCategoryEditWindow.open('鏂板缓鐗╁搧绛夌骇', null, 4)" icon="el-icon-plus">鏂板缓</el-button></li>
+ </ul>
+ <el-table
+ :height="tableHeightNew"
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ >
+ <el-table-column prop="id" label="ID" min-width="80px"></el-table-column>
+ <el-table-column prop="name" label="琛屾潕绫诲瀷" min-width="120px"></el-table-column>
+ <el-table-column prop="remark" label="澶囨敞璇存槑" min-width="200px"></el-table-column>
+ <el-table-column prop="sortnum" label="鎺掑簭" min-width="100px"></el-table-column>
+ <el-table-column prop="createTime" label="鎻愪氦鏃堕棿" min-width="100px"></el-table-column>
+ <el-table-column label="鐘舵��" min-width="80px">
+ <template slot-scope="{row}">
+ <el-switch
+ @change="handleStatusChange($event, row)"
+ v-model="row.status"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ :active-value="0"
+ :inactive-value="1"
+ ></el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" min-width="150" fixed="right">
+ <template slot-scope="{row}">
+ <el-button type="text" @click="handleEdit(row)">缂栬緫</el-button>
+ <el-button type="text" @click="deleteById(row.id)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ ></pagination>
+ </template>
+ <OperaGoodsCategoryEditWindow ref="operaGoodsCategoryEditWindow" @success="search" />
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaGoodsCategoryEditWindow from '@/components/business/OperaGoodsCategoryEditWindow'
+import { updateStatus } from '@/api/business/goodsCategory'
+
+export default {
+ name: 'BaggageTypeList',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaGoodsCategoryEditWindow },
+ data () {
+ return {
+ searchForm: {
+ name: '',
+ type: 4
+ }
+ }
+ },
+ created () {
+ this.config({
+ api: '/business/goodsCategory',
+ 'field.id': 'id'
+ })
+ this.search()
+ },
+ methods: {
+ handleEdit (row) {
+ this.$refs.operaGoodsCategoryEditWindow.open('缂栬緫鐗╁搧绛夌骇', row, 4)
+ },
+ handleStatusChange (val, row) {
+ updateStatus({ id: row.id, status: val }).then(res => {
+ this.$tip.apiSuccess(res || '淇敼鎴愬姛')
+ }).catch(e => {
+ row.status = val === 1 ? 0 : 1
+ this.$tip.apiFailed(e)
+ })
+ }
+ }
+}
+</script>
--
Gitblit v1.9.3