From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期二, 29 四月 2025 13:25:29 +0800
Subject: [PATCH] Merge branch 'dev' into dev_tides

---
 src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue |  116 +++++++++++++++++++++++++---------------------------------
 1 files changed, 50 insertions(+), 66 deletions(-)

diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue b/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue
index bf5c9e4..d902602 100644
--- a/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue
+++ b/src/views/CNAS/personnel/personnelInfo/tabs/reward-punishment-record.vue
@@ -1,41 +1,34 @@
 <!-- 濂栨儵璁板綍 -->
 <template>
   <div>
-    <div class="view">
-      <div style="display: flex;justify-content: space-between;">
-        <el-form :model="search" ref="page" size="small" :inline="true">
-          <el-form-item label="濮撳悕">
-            <el-input v-model="search.userName" clearable placeholder="璇疯緭鍏ュ叧閿瓧" size="small" style="width: 20vh;"></el-input>
-          </el-form-item>
-          <el-form-item label="濂栨儵鏃ユ湡">
-            <el-date-picker
-              v-model="search.searchTimeList"
-              :picker-options="pickerOptions"
-              align="right"
-              clearable
-              end-placeholder="缁撴潫鏃ユ湡"
-              format="yyyy-MM-dd"
-              range-separator="鑷�"
-              size="small"
-              start-placeholder="寮�濮嬫棩鏈�"
-              style="width: 100%"
-              type="daterange"
-              unlink-panels
-              value-format="yyyy-MM-dd 00:00:00">
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item>
-            <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button>
-          </el-form-item>
-        </el-form>
-        <div>
-          <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button>
-          <el-button size="small" type="primary" @click="addRow">鏂板</el-button>
+    <div style="display: flex;justify-content: space-between">
+      <div style="display: flex;">
+        <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+          <span style="width: 48px;font-size: 14px;font-weight: 700;color: #606266;">濮撳悕</span>
+          <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="search.userName"
+                    @keyup.enter.native="getPersonnelTraining(departId)"></el-input>
         </div>
+        <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+          <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">濂栨儵鏃ユ湡</span>
+          <el-date-picker v-model="search.searchTimeList" :picker-options="pickerOptions" align="right" clearable
+                          @change="getPersonnelTraining(departId)"
+                          end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�"
+                          style="width: 100%" type="daterange" unlink-panels value-format="yyyy-MM-dd 00:00:00">
+          </el-date-picker>
+        </div>
+        <div style="line-height: 30px;">
+          <el-button size="mini" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button>
+        </div>
+      </div>
+      <div style="line-height: 30px;">
+        <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button>
+        <el-button size="small" type="primary" @click="addRow">鏂板</el-button>
       </div>
     </div>
     <div class="table">
-      <el-table :data="tableData" v-loading="tableLoading" height="66.5vh" style="width: 100%">
+      <el-table :data="tableData" v-loading="tableLoading"
+                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+                height="66.5vh" style="width: 100%">
         <el-table-column label="搴忓彿" type="index" width="120">
           <template v-slot="scope">
             <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
@@ -64,19 +57,12 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-pagination :current-page="1" :page-size="search.size"
-                     :page-sizes="[10, 20, 30, 50, 100]"
-                     :total="search.total" layout="->,total, sizes, prev, pager, next, jumper"
-                     background
-                     @size-change="handleSizeChange"
-                     @current-change="handleCurrentChange">
+      <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
+        :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" background style="margin-top: 10px"
+        @size-change="handleSizeChange" @current-change="handleCurrentChange">
       </el-pagination>
     </div>
-    <el-dialog
-      :visible.sync="dialogVisible"
-      title="濂栨儵璁板綍"
-      width="50%"
-      @open="getUserList">
+    <el-dialog :visible.sync="dialogVisible" title="濂栨儵璁板綍" width="50%" @open="getUserList">
       <div style="height: 40vh">
         <el-form ref="form" :model="form" :rules="rules" label-width="120px">
           <el-col :span="12">
@@ -87,7 +73,7 @@
           <el-col :span="12">
             <el-form-item label="鍛樺伐濮撳悕" prop="userId">
               <el-select v-model="form.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%" value-key="id"
-                         @change="selectUserChange" :disabled="!isDepartment">
+                @change="selectUserChange" :disabled="!isDepartment">
                 <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id">
                 </el-option>
               </el-select>
@@ -105,14 +91,8 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="濂栨儵鏃堕棿" prop="rewardPunishTime">
-              <el-date-picker
-                v-model="form.rewardPunishTime"
-                format="yyyy-MM-dd HH:mm:ss"
-                placeholder="閫夋嫨鏃ユ湡"
-                size="small"
-                style="width: 100%"
-                type="datetime"
-                value-format="yyyy-MM-dd HH:mm:ss">
+              <el-date-picker v-model="form.rewardPunishTime" format="yyyy-MM-dd HH:mm:ss" placeholder="閫夋嫨鏃ユ湡"
+                size="small" style="width: 100%" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -142,8 +122,8 @@
   rewardPunishmentExport,
   rewardPunishmentPage
 } from "@/api/cnas/personal/personRewardPunishmentRecord";
-import {selectUserCondition} from "@/api/system/user";
-import {delCustomById} from "@/api/system/customer";
+import { selectUserCondition } from "@/api/system/user";
+import { delCustomById } from "@/api/system/customer";
 
 export default {
   props: {
@@ -234,12 +214,12 @@
     async getPersonnelTraining() {
       const params = {
         userId: this.isDepartment ? '' : this.departId,
-          departmentId: this.isDepartment ? this.departId : '',
-          current: this.search.curent,
-          size: this.search.size,
-          userName: this.search.userName,
-          startTime: this.search.searchTimeList && this.search.searchTimeList[0],
-          endTime: this.search.searchTimeList && this.search.searchTimeList[1],
+        departmentId: this.isDepartment ? this.departId : '',
+        current: this.search.curent,
+        size: this.search.size,
+        userName: this.search.userName,
+        startTime: this.search.searchTimeList && this.search.searchTimeList[0],
+        endTime: this.search.searchTimeList && this.search.searchTimeList[1],
       }
       this.tableLoading = true
       rewardPunishmentPage(params).then(res => {
@@ -250,14 +230,14 @@
         this.tableLoading = false
       })
     },
-    addRow () {
+    addRow() {
       this.dialogVisible = true
       if (!this.isDepartment) {
         this.form.userId = this.departId
         this.selectUserChange(this.form.userId)
       }
     },
-    handleDown(){
+    handleDown() {
       this.outLoading = true
       rewardPunishmentExport({
         userId: this.isDepartment ? '' : this.departId,
@@ -271,12 +251,11 @@
           type: 'application/force-download'
         })
         this.$download.saveAs(blob, '濂栨儵璁板綍.xlsx')
-        this.$message.success('瀵煎嚭鎴愬姛')
       })
     },
     // 鑾峰彇璐熻矗浜轰俊鎭帴鍙�
     getUserList() {
-      selectUserCondition().then(res => {
+      selectUserCondition({type: 2}).then(res => {
         if (res.code == 200) {
           this.responsibleOptions = res.data
         }
@@ -292,7 +271,7 @@
     // 鎵撳紑琛ㄥ崟寮规
     editForm(row) {
       this.dialogVisible = true
-      this.form = {...row};
+      this.form = { ...row };
     },
     // 鎻愪氦琛ㄥ崟鏁版嵁
     saveOrUpdate() {
@@ -312,7 +291,7 @@
         cancelButtonText: "鍙栨秷",
         type: "warning"
       }).then(() => {
-        deleteRewardPunishment({id: row.id}).then(res => {
+        deleteRewardPunishment({ id: row.id }).then(res => {
           if (res.code === 500) {
             return
           }
@@ -321,7 +300,7 @@
         }).catch(e => {
           this.$message.error('鍒犻櫎澶辫触')
         })
-      }).catch(() => {})
+      }).catch(() => { })
 
     }
   },
@@ -341,3 +320,8 @@
   }
 };
 </script>
+<style scoped>
+.dateTime >>>.el-form-item__content {
+  width: 260px;
+}
+</style>

--
Gitblit v1.9.3