From 5e9b4920000a4d02eef3b207218e3ce8d68935be Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期四, 11 七月 2024 17:47:05 +0800
Subject: [PATCH] feat:纤度登记表重构

---
 src/views/reportManage/payableSalaryReport/index.vue |   58 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/src/views/reportManage/payableSalaryReport/index.vue b/src/views/reportManage/payableSalaryReport/index.vue
index d5641ab..347c747 100644
--- a/src/views/reportManage/payableSalaryReport/index.vue
+++ b/src/views/reportManage/payableSalaryReport/index.vue
@@ -11,13 +11,16 @@
           @searchClick="onFilterSearch"
         >
           <template slot="leftButton">
-            <div class="margin_right_20px" style="width:200px;">
-              <el-date-picker v-model="object.date" style="width:100%"
-              @change="onFilterSearch"
+            <div class="margin_right_20px" >
+              <el-date-picker v-model="object.date"
+               style="width:200px;"
+               class="margin_right_20px" 
+              @change="onFilterSearch(object.date,'date')"
               :clearable="false" type="month" placeholder="閫夋嫨鏃ユ湡"
               :picker-options="pickerOptions"
                 value-format="yyyy-MM">
               </el-date-picker>
+              <el-button size="small" type="primary" @click="exportBtnClick">瀵煎嚭</el-button>
             </div>
           </template>
         </CommonSearch>
@@ -36,16 +39,16 @@
           >
           </TableCommonView>
         </div>
-        <!-- <div class="btn-pager">
+        <div class="btn-pager">
           <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
-        </div> -->
+        </div>
       </div>
     </div> 
   </div>
 </template>
 
 <script>
-import { getAttendanceStatistic } from  "@/api/employeeSalary/attendanceManage.js"
+import { salaryReportForms } from  "@/api/reportManage/report.js"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import NewDate from "@/api/date";
 const { getCurrentMonth } = NewDate;
@@ -73,13 +76,15 @@
       tableColumn: [
         { label: "濮撳悕", prop: "workerName", min: 120, default: true }, 
         { label: "浜哄憳id", prop: "workerId", min: 190,default: true}, 
-        { label: "鎵嬫満鍙�", prop: "client_level" },
+        { label: "鎵嬫満鍙�", prop: "phone" },
         { label: "宸ョ", prop: "workType", min: 100, },
-        { label: "澶囨敞", prop: "actualAttendanceDays", min: 110 }, 
+        { label: "搴斿彂宸ヨ祫", prop: "issueSalary", min: 110 },
+        { label: "澶囨敞", prop: "remark", min: 110 }, 
       ],
       showCol: [
         "鎵嬫満鍙�",
         "宸ョ",
+        "搴斿彂宸ヨ祫",
         "澶囨敞",
       ]
     }
@@ -123,15 +128,15 @@
     // 璇锋眰鏁版嵁
     async getData() {
       this.loading = true
-      await getAttendanceStatistic({
+      await salaryReportForms({
         keyword: this.keyword,
         month:this.object.date,
-        // page: this.pagerOptions.currPage,
-        // pageSize: this.pagerOptions.pageSize
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize
       })
         .then((res) => {
           if (res.code == 200) {
-            if (res.data.list && res.data.list.length > 0) {
+            if (res.data && res.data.length > 0) {
               let tableColumn1= [
                 { label: "濮撳悕", prop: "workerName", min: 120,default: true,fixed:'left' }, 
                 { label: "浜哄憳ID", prop: "workerId", min: 120,default: true,fixed:'left'}, 
@@ -142,12 +147,12 @@
                { label: "澶囨敞", prop: "actualAttendanceDays", min: 110 }, 
               ]
               let tableColumn2=[]
-              let headerList=res.data.list.length>0?res.data.list[0]:[]
-                if(headerList.details&&headerList.details.length>0){
-                  for(let i in headerList.details){
+              let headerList=res.data.details?res.data.details:[]
+                if(headerList&&headerList.length>0){
+                  for(let i in headerList){
                     tableColumn2.push({
-                      label:headerList.details[i].date+'',
-                      prop:'headerDate'+headerList.details[i].date,
+                      label:headerList[i].salaryType+'',
+                      prop:'header&'+headerList[i].salaryType+'&'+headerList[i].salaryTypeId,
                       min:150,
                       default:true,
                       isEditTd:true,
@@ -158,11 +163,11 @@
               let tableColumn=tableColumn1.concat(tableColumn2).concat(tableColumn3)
               this.tableColumn=tableColumn;
               this.setTable()
-              const list = res.data.list.map((item) => {
+              const list = res.data.map((item) => {
                 let headerItem={}
                 let details=item.details?item.details:[]
                 for(let i in details){
-                  headerItem['headerDate'+details[i].date]=details[i].status
+                  headerItem['header&'+details[i].salaryType+'&'+details[i].salaryTypeId]=details[i].amount
                 }
                 return {
                   ...item,
@@ -170,7 +175,7 @@
                 }
               })
               this.tableList.tableInfomation = list || []
-              this.pagerOptions.totalCount = res.total
+              this.pagerOptions.totalCount = res.total||0
             } else {
               this.tableList.tableInfomation = []
             }
@@ -186,14 +191,18 @@
         })
     },
     // 鎼滅储
-    onFilterSearch(searchText) {
-      this.keyword = searchText ?? ""
+    onFilterSearch(searchText,val) {
+      if(val!='date'){
+        this.keyword = searchText ?? ""
+      }
       this.pagerOptions.currPage = 1
       this.getData()
     },
     inputContent( prop, row, scope){
       console.log(prop,'---',row,'---',scope)
     },
+     // 瀵煎嚭
+     exportBtnClick() {}
   }
 }
 </script>
@@ -223,15 +232,16 @@
     box-sizing: border-box;
     padding: 10px 20px;
     border-radius: 12px;
-    height: calc(100% - 92px);
+    height: calc(100% - 102px);
     .body-card {
       background-color: #fff;
       border-radius: 12px;
       height: 100%;
+      box-sizing: border-box;
       overflow: hidden;
     }
     .list-view {
-      height: calc(100% - 10px);
+      height: calc(100% - 60px);
       overflow: hidden;
     }
     .btn-pager {

--
Gitblit v1.8.0