From c9ad1f34a86e54b1c690c623ba661cd4131a3d71 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期四, 28 十一月 2024 18:43:32 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei --- admin/src/views/finance/account.vue | 58 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 42 insertions(+), 16 deletions(-) diff --git a/admin/src/views/finance/account.vue b/admin/src/views/finance/account.vue index 3cb9a42..1d60573 100644 --- a/admin/src/views/finance/account.vue +++ b/admin/src/views/finance/account.vue @@ -6,15 +6,20 @@ 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="realName" label="閾惰璐﹀彿" min-width="100" show-overflow-tooltip /> + <el-table-column prop="title" label="鏀舵敮鏉$洰" min-width="100" show-overflow-tooltip /> + <el-table-column prop="companyName" label="鏀舵鍏徃" min-width="100" show-overflow-tooltip /> + <el-table-column label="璐︽埛绫诲瀷" min-width="100" show-overflow-tooltip> + <template v-slot="{row}"> + <span v-if="row.type == 0">瀵瑰叕</span> + <span v-if="row.type == 1">涓汉</span> + </template> + </el-table-column> + <el-table-column prop="name" label="璐︽埛鍚嶇О" min-width="100" show-overflow-tooltip /> + <el-table-column prop="bankName" label="寮�鎴烽摱琛�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="bankNo" 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> @@ -22,7 +27,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> @@ -38,7 +43,9 @@ import Pagination from '@/components/common/Pagination' import QueryForm from '@/components/common/QueryForm' import Edit from './components/accountEdit.vue' -import { companyGetList, deleteById } from '@/api/business/company' +import { fetchList, updateById, deleteById } from '@/api/business/ywAccount' +import { companyGetList } from '@/api/business/company' +import { Message } from 'element-ui' export default { components: { Pagination, @@ -60,14 +67,17 @@ queryFormConfig: { formItems: [ { - filed: 'name', + filed: 'title', type: 'input', label: '鏀舵敮鏉$洰' }, { - filed: 'name', + filed: 'companyId', type: 'select', - label: '鏀舵鍏徃' + label: '鏀舵鍏徃', + labelCode: 'name', + valueCode: 'id', + options: [] }, ], online: true @@ -76,15 +86,15 @@ }, created() { this.getList() + this.getCompany() }, methods: { getList(page) { const { pagination, filters } = this this.loading = true - companyGetList({ + fetchList({ model: { ...filters, - type: 2 }, capacity: pagination.pageSize, page: page || pagination.page, @@ -99,6 +109,23 @@ this.loading = false }) }, + changeStatus(row) { + updateById(row).then(res => { + this.getList() + Message.success('鏇存柊鐘舵�佹垚鍔�') + }, () => { + this.getList() + }) + }, + getCompany(){ + companyGetList({ + model: {type: 2}, + capacity: 9999, + page: 1 + }).then(res => { + this.queryFormConfig.formItems[1].options = res.records || [] + }) + }, handleEdit(row) { this.showEdit = true this.$nextTick(() => { @@ -110,10 +137,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