From 0d626ae57149d5ed40a32bd8b808ca6069aa6d5e Mon Sep 17 00:00:00 2001 From: gaosp <gaosp> Date: 星期日, 14 一月 2024 16:35:08 +0800 Subject: [PATCH] update --- src/container/ledger/index.vue | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/container/ledger/index.vue b/src/container/ledger/index.vue index 209e42b..749b994 100644 --- a/src/container/ledger/index.vue +++ b/src/container/ledger/index.vue @@ -1,7 +1,7 @@ <!-- * @Date: 2024-01-06 17:40:19 * @LastEditors: Sneed - * @LastEditTime: 2024-01-13 22:13:17 + * @LastEditTime: 2024-01-14 16:31:53 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/ledger/index.vue --> <template> @@ -53,7 +53,8 @@ </div> <div class="item"> <span>鎶曚骇鏃ユ湡</span> - <el-date-picker class="item-value" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="queryInfo.productionDate" type="date" clearable placeholder="閫夋嫨鏃ユ湡"></el-date-picker> + <el-date-picker class="item-value" format="yyyy-MM-dd" value-format="yyyy-MM-dd" + v-model="queryInfo.productionDate" type="date" clearable placeholder="閫夋嫨鏃ユ湡"></el-date-picker> </div> <div class="item"> <span>鐢熶骇鍘傚</span> @@ -128,6 +129,7 @@ <el-table-column fixed="right" align="center" label="鎿嶄綔"> <template slot-scope="scope"> <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row)">缂栬緫</el-button> + <el-button type="text" size="small" @click="del(scope.row)">鍒犻櫎</el-button> </template> </el-table-column> </template> @@ -139,7 +141,7 @@ </template> <script> import ManageAddUpdate from './Manage-add-update' -import { getUseDpts } from '@/api/Api' +import { getUseDpts, getRequest } from '@/api/Api' import List from '../list/index.vue' export default { components: { @@ -218,7 +220,7 @@ query() { this.$refs.list.pageQuery(this.queryInfo) }, - reset () { + reset() { Object.keys(this.queryInfo).forEach(key => { this.queryInfo[key] = '' }) @@ -237,6 +239,26 @@ addOrUpdateHandle(row) { this.row = row this.addOrUpdateVisible = true + }, + del(row) { + this.$confirm('纭畾瑕佹案涔呭垹闄ゆ椤�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + getRequest('accountDel', { ids: [row.id].join(',') }).then(res => { + this.$message({ + type: 'success', + message: '鍒犻櫎鎴愬姛锛�' + }) + this.submitForm() + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }) + }) + }) } }, } @@ -250,9 +272,11 @@ border: 1px solid #435F9E; } } + .el-button--mini { background: transparent; } + .el-button--primary { background-color: transparent; } -- Gitblit v1.9.3