From a3094611deac91e0ec35bcfe3f3fdd3bdf993466 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 26 四月 2024 16:18:40 +0800
Subject: [PATCH] 考勤统计模块 增加月份对应的星期的数据处理+对应考勤统计的样式调整
---
src/views/employeeManage/workKindManage/index.vue | 51 ++++++++++++++++++++++++++-------------------------
1 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/src/views/employeeManage/workKindManage/index.vue b/src/views/employeeManage/workKindManage/index.vue
index e3c2390..8970b3d 100644
--- a/src/views/employeeManage/workKindManage/index.vue
+++ b/src/views/employeeManage/workKindManage/index.vue
@@ -30,7 +30,7 @@
<el-table-column label="鎿嶄綔" width="90" fixed="right">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
- <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
+ <el-button @click="delClick(scope.row)" type="text" size="small">鍒犻櫎</el-button>
</template>
</el-table-column>
</template>
@@ -41,12 +41,12 @@
</div>
</div>
</div>
- <AddWorkKind ref="addWorkKind" :editRow="editRow" @shutdown="shutdown" />
+ <AddWorkKind ref="addWorkKind" :editRow="editRow" @refresh="shutdown" />
</div>
</template>
<script>
-import { getFollowRecordList, getDeleteFollowRecord } from "@/api/employeeManage/employeeInfo.js"
+import { getWorkTypeList, deleteWorkTypeInfo } from "@/api/employeeManage/employeeInfo.js"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import AddWorkKind from "@/views/employeeManage/workKindManage/components/AddWorkKind"
export default {
@@ -65,13 +65,13 @@
editRow: {
title: "鏂板缓",
},
- search_map: {},
+ keyWord: '',
tableColumn: [
- { label: "宸ョ鍚嶇О", prop: "topic", min: 120, default: true }, // 涓婚
- { label: "淇濆簳宸ヨ祫(鍏�/澶�)", prop: "client_name", min: 180, }, // 瀹㈡埛鍚嶇О
- { label: "钖祫鏂规", prop: "contact_name", min: 130, }, // 鑱旂郴浜哄鍚�
- { label: "娣诲姞鏃堕棿", prop: "client_status", width: 130 }, // 瀹㈡埛鐘舵��
- { label: "娣诲姞浜�", prop: "contact_information_name", min: 100 }, // 鑱旂郴鏂瑰紡
+ { label: "宸ョ鍚嶇О", prop: "workName", min: 120, default: true }, // 涓婚
+ { label: "淇濆簳宸ヨ祫(鍏�/澶�)", prop: "guaranteedWages", min: 180, }, // 瀹㈡埛鍚嶇О
+ { label: "钖祫鏂规", prop: "salaryPlansName", min: 130, }, // 鑱旂郴浜哄鍚�
+ { label: "娣诲姞鏃堕棿", prop: "createTime", width: 130 }, // 瀹㈡埛鐘舵��
+ { label: "娣诲姞浜�", prop: "addPeople", min: 100 }, // 鑱旂郴鏂瑰紡
],
showCol: [
"宸ョ鍚嶇О",
@@ -84,7 +84,7 @@
},
created() {
this.setTable()
- this.getData(this.search_map)
+ this.getData(this.keyWord)
},
computed: {
},
@@ -120,28 +120,29 @@
// 璇锋眰鏁版嵁
async getData() {
this.loading = true
- await getFollowRecordList({
- search_map: this.search_map,
+ await getWorkTypeList({
+ keyWord: this.keyWord,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
})
.then((res) => {
console.log(res)
if (res.code === 200) {
- if (res.data.list && res.data.list.length > 0) {
- const list = res.data.list.map((item) => {
+ if (res.data && res.data.length > 0) {
+ const list = res.data.map((item) => {
+ let salaryPlansName=''
+ if(item.salaryPlans){
+ for(let i in item.$confirmsalaryPlans){
+ salaryPlansName=salaryPlansName+'+'+item.salaryPlans[i].name
+ }
+ }
return {
...item,
- client_name: item.client.name,
- contact_name: item.contact.name,
- client_status: item.client_status.name,
- phone: item.contact.phone,
- member_name: item.member.username,
- contact_information_name: item.contact_information.name
+ salaryPlansName:salaryPlansName,
}
})
this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.count
+ this.pagerOptions.totalCount = res.total
} else {
this.tableList.tableInfomation = []
}
@@ -158,7 +159,7 @@
},
// 鎼滅储
onFilterSearch(searchText) {
- this.search_map.client_name = searchText ?? ""
+ this.keyWord = searchText ?? ""
this.pagerOptions.currPage = 1
this.getData()
},
@@ -173,18 +174,18 @@
// 缂栬緫
handleClick(row) {
let config=JSON.parse(JSON.stringify(row));
- this.editRow = { ...config, title:'缂栬緫',type:'add' }
+ this.editRow = { ...config, title:'缂栬緫',type:'edit',id:row.ID, }
this.$refs.addWorkKind.islook = true;
},
// 鍒犻櫎
- delClick(id) {
+ delClick(row) {
this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
})
.then(() => {
- getDeleteFollowRecord({ ids: [id] }).then((response) => {
+ deleteWorkTypeInfo({ id: row.ID }).then((response) => {
if (response.code === 200) {
this.$message.success("鍒犻櫎鎴愬姛")
this.getData()
--
Gitblit v1.8.0