From bc87b51e20a0adf0badf2033ede93cafeb5fc147 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 27 十一月 2024 17:29:59 +0800
Subject: [PATCH] 开发更新
---
admin/src/views/finance/company.vue | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/admin/src/views/finance/company.vue b/admin/src/views/finance/company.vue
index 6397411..36e48b1 100644
--- a/admin/src/views/finance/company.vue
+++ b/admin/src/views/finance/company.vue
@@ -6,14 +6,14 @@
v-permissions="['business:ywpatrolline:create']">鏂板缓</el-button>
</div>
<el-table v-loading="loading" :data="list" stripe>
- <el-table-column prop="code" label="鍏徃鍚嶇О" min-width="100" show-overflow-tooltip />
- <el-table-column prop="name" label="鍏徃绠�浠�" min-width="100" show-overflow-tooltip />
- <el-table-column prop="" label="绾崇◣璇嗗埆鍙�" min-width="100" show-overflow-tooltip />
- <el-table-column prop="modelNo" label="鍏徃鍦板潃" min-width="100" show-overflow-tooltip />
- <el-table-column prop="realName" label="鏀舵敮璐︽埛鏁伴噺" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="name" label="鍏徃鍚嶇О" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="shortName" label="鍏徃绠�浠�" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="code" label="绾崇◣璇嗗埆鍙�" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="address" label="鍏徃鍦板潃" min-width="100" show-overflow-tooltip />
+ <el-table-column prop="accountNum" label="鏀舵敮璐︽埛鏁伴噺" min-width="100" show-overflow-tooltip />
<el-table-column prop="status" label="鐘舵��" min-width="100" show-overflow-tooltip>
<template v-slot="scope">
- <el-switch v-model="scope.row.status" active-value="0" inactive-value="1">
+ <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1">
</el-switch>
</template>
</el-table-column>
@@ -21,7 +21,7 @@
<template slot-scope="{row}">
<el-button type="text" @click="handleEdit(row)" icon="el-icon-edit"
v-permissions="['business:category:update']">缂栬緫</el-button>
- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
+ <el-button type="text" @click="handleDel(row)" icon="el-icon-delete"
v-permissions="['business:category:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -37,7 +37,8 @@
import Pagination from '@/components/common/Pagination'
import QueryForm from '@/components/common/QueryForm'
import Edit from './components/companyEdit.vue'
-import { companyGetList, deleteById } from '@/api/business/company'
+import { companyGetList, deleteById, updateStatusById } from '@/api/business/company'
+import { Message } from 'element-ui'
export default {
components: {
Pagination,
@@ -72,6 +73,14 @@
this.getList()
},
methods: {
+ changeStatus(row) {
+ updateStatusById(row).then(res => {
+ this.getList()
+ Message.success('鏇存柊鐘舵�佹垚鍔�')
+ }, () => {
+ this.getList()
+ })
+ },
getList(page) {
const { pagination, filters } = this
this.loading = true
@@ -104,10 +113,9 @@
},
handleDel(row) {
- let message = `纭鍒犻櫎璇ヨ褰曞悧?`
+ let message = `纭鍒犻櫎璇ュ叕鍙稿悧?`
this.$dialog.deleteConfirm(message)
.then(() => {
- this.isWorking.delete = true
deleteById(row.id)
.then(() => {
this.$tip.apiSuccess('鍒犻櫎鎴愬姛')
--
Gitblit v1.9.3