From 6dc15f2af53473661beee3388b9180ebdf516726 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期日, 10 八月 2025 15:01:19 +0800
Subject: [PATCH] 1
---
src/views/tasks/machinereturnfiles.vue | 37 ++++++++++++++++++++++++++++++++++++-
1 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/src/views/tasks/machinereturnfiles.vue b/src/views/tasks/machinereturnfiles.vue
index 56bd259..73431d1 100644
--- a/src/views/tasks/machinereturnfiles.vue
+++ b/src/views/tasks/machinereturnfiles.vue
@@ -13,10 +13,12 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
+ @selection-change="selectionChange"
@on-load="onLoad"
>
<template #menu-left>
- <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">瀵煎嚭</el-button>
+ <!-- el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="handleExport">瀵煎嚭</el-button> -->
+ <el-button type="primary" size="default" icon="el-icon-circle-plus" plain @click="receiveBtn">鎵归噺鎺ユ敹</el-button>
</template>
<template #menu="scope">
<el-button type="primary" text size="default" icon="el-icon-document-delete" @click.stop="rejectBtn(scope.row, scope.index)">鎷掔粷</el-button>
@@ -27,6 +29,7 @@
</template>
<script>
+ import { ElMessage } from 'element-plus';
import { exportBlob } from '@/api/common';
import { downloadXls } from '@/utils/util';
import { getToken } from '@/utils/auth';
@@ -35,6 +38,7 @@
export default {
data() {
return {
+ selection: [],
search: {
keyword: "",
machineGroupCode: ""
@@ -47,6 +51,7 @@
},
option: {
index: true,
+ selection: true,
addBtn: false,
editBtn: false,
delBtn: false,
@@ -109,6 +114,36 @@
};
},
methods: {
+ selectionChange(selection) {
+ this.selection = selection;
+ },
+ receiveBtn() {
+ if(this.selection.length == 0) {
+ ElMessage({message: '璇烽�夋嫨鏁版嵁',type: 'error'})
+ }
+ var ids = [];
+ this.selection.forEach(item=> {
+ ids.push(item.id);
+ })
+ this.$confirm('纭畾瑕佹帴鏀跺悧?', { //鍚屾帴鏀舵帴鍙g浉鍚�
+ confirmButtonText: '鏄�',
+ cancelButtonText: '鍚�',
+ type: 'warning',
+ }).then(() => {
+ //璋冪敤鎺ュ彛
+ this.loading = true;
+ axios({
+ url: '/blade-mdm/machineback/file/accept',
+ method: 'post',
+ params: {ids: ids.join(',')},
+ }).then(
+ res => {
+ this.loading = false;
+ this.onLoad();
+ }
+ );
+ })
+ },
acceptBtn(row) {
this.$confirm('纭畾瑕佹帴鏀跺悧?', {
confirmButtonText: '鏄�',
--
Gitblit v1.9.3