From a3e3b7564d4d5cea245b57248b186248a169b7ac Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 22 八月 2025 18:32:26 +0800
Subject: [PATCH] 去掉标题空格

---
 src/views/tasks/machinereturnfiles.vue |   58 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/src/views/tasks/machinereturnfiles.vue b/src/views/tasks/machinereturnfiles.vue
index f825989..91f5f48 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,
@@ -60,18 +65,15 @@
             prop: 'programName',
             hide: true
           },
-          {
-            label: '鏂囦欢缂栧彿',
-            prop: ''
+		  {
+            label: '鏂囦欢鍚嶇О',
+            prop: 'name',
           },
           {
             label: '鏈哄簥鍙�',
             prop: 'machineCode',
           },
-          {
-            label: '鏂囦欢鍚嶇О',
-            prop: 'name',
-          },
+          
           {
             label: '鏂囦欢鍥哄寲鐘舵��',
             prop: 'isCured',
@@ -79,11 +81,11 @@
           {
             label: '鏂囦欢鍒拌揪鏃堕棿',
             prop: 'arrivedTime',
-          },
+          },/*
           {
             label: '鏂囦欢鏁版嵁搴撶紪鍙�',
             prop: '',
-          },
+          },*/
           {
             label: '鍏抽敭淇℃伅',
             prop: 'keyword',
@@ -109,6 +111,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: '鏄�',
@@ -120,7 +152,7 @@
         axios({
           url: '/blade-mdm/machineback/file/accept',
           method: 'post',
-          data: {ids: row.id},
+          params: {ids: row.id},
         }).then(
           res => {
             this.loading = false;
@@ -138,8 +170,8 @@
         //璋冪敤鎺ュ彛
         this.loading = true;
         axios({
-          url: '/blade-mdm/machineback/file/page',
-          method: 'get',
+          url: '/blade-mdm/machineback/file/reject',
+          method: 'post',
           params: {ids: row.id},
         }).then(
           res => {

--
Gitblit v1.9.3