From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 06 六月 2025 19:19:34 +0800 Subject: [PATCH] 开发更新 --- admin/src/views/finance/account.vue | 60 ++++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 44 insertions(+), 16 deletions(-) diff --git a/admin/src/views/finance/account.vue b/admin/src/views/finance/account.vue index 3cb9a42..d8b6ae1 100644 --- a/admin/src/views/finance/account.vue +++ b/admin/src/views/finance/account.vue @@ -6,15 +6,21 @@ 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 +28,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 +44,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 +68,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 +87,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 +110,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 +138,9 @@ }, handleDel(row) { - let message = `纭鍒犻櫎璇ヨ褰曞悧?` + let message = `纭鍒犻櫎璇ヨ处鎴峰悧?` this.$dialog.deleteConfirm(message) .then(() => { - this.isWorking.delete = true deleteById(row.id) .then(() => { this.$tip.apiSuccess('鍒犻櫎鎴愬姛') @@ -130,6 +157,7 @@ }, handleSizeChange(capacity) { this.pagination.pageSize = capacity + this.getList() } } } -- Gitblit v1.9.3