From a3094611deac91e0ec35bcfe3f3fdd3bdf993466 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 26 四月 2024 16:18:40 +0800
Subject: [PATCH] 考勤统计模块 增加月份对应的星期的数据处理+对应考勤统计的样式调整
---
src/views/productManage/silkRegisterForm/index.vue | 85 ++++++++++++++++++++----------------------
1 files changed, 41 insertions(+), 44 deletions(-)
diff --git a/src/views/productManage/silkRegisterForm/index.vue b/src/views/productManage/silkRegisterForm/index.vue
index ba237f2..e6e7349 100644
--- a/src/views/productManage/silkRegisterForm/index.vue
+++ b/src/views/productManage/silkRegisterForm/index.vue
@@ -30,8 +30,8 @@
<template slot="tableButton">
<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="handleClick(scope.row)" type="text" size="small">淇敼</el-button>
+ <el-button @click="delClick(scope.row.ID)" type="text" size="small">鍒犻櫎</el-button>
</template>
</el-table-column>
</template>
@@ -46,7 +46,7 @@
</template>
<script>
-import { getFollowRecordList, getDeleteFollowRecord } from "@/api/productManage/silkRegisterForm.js"
+import { getRegisterList,getDeleteRegister } from "@/api/productManage/silkRegisterForm.js"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
@@ -61,21 +61,16 @@
tableList: {},
loading: false,
searchOptions: [],
- editConfig: {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- },
- search_map: {},
+ keyword: '',
tableColumn: [
- { label: "缂栧彿", prop: "topic", min: 120, default: true }, // 涓婚
- { label: "钀戒笣鏃堕棿", prop: "client_name", min: 190, }, // 瀹㈡埛鍚嶇О
- { label: "杞︾粍", prop: "contact_name", min: 100, }, // 鑱旂郴浜哄鍚�
- { label: "瑙勬牸", prop: "client_status", min: 100 }, // 瀹㈡埛鐘舵��
- { label: "杞﹂棿", prop: "contact_information_name", min: 100 }, // 鑱旂郴鏂瑰紡
- { label: "搴勫彛", prop: "follow_time", min: 130 }, // 鑱旂郴浜烘棩鏈�
- { label: "寮�濮嬪洖鏁�", prop: "next_follow_time", min: 130 }, // 涓嬫鍥炶鏃ユ湡
- { label: "缁撴潫鍥炴暟", prop: "member_name", min: 110 }, // 璐熻矗浜�
+ { label: "缂栧彿", prop: "number", min: 120, default: true }, // 涓婚
+ { label: "钀戒笣鏃堕棿", prop: "finishDate", min: 190, }, // 瀹㈡埛鍚嶇О
+ { label: "杞︾粍", prop: "workshopGroup", min: 100, }, // 鑱旂郴浜哄鍚�
+ { label: "瑙勬牸", prop: "spec", min: 100 }, // 瀹㈡埛鐘舵��
+ { label: "杞﹂棿", prop: "name", min: 100 }, // 鑱旂郴鏂瑰紡
+ { label: "搴勫彛", prop: "market", min: 130 }, // 鑱旂郴浜烘棩鏈�
+ { label: "寮�濮嬪洖鏁�", prop: "circle", min: 130 }, // 涓嬫鍥炶鏃ユ湡
+ { label: "缁撴潫鍥炴暟", prop: "totalCircle", min: 110 }, // 璐熻矗浜�
],
showCol: [
"缂栧彿",
@@ -91,7 +86,7 @@
},
created() {
this.setTable()
- this.getData(this.search_map)
+ this.getData(this.keyword)
},
computed: {
},
@@ -127,28 +122,28 @@
// 璇锋眰鏁版嵁
async getData() {
this.loading = true
- await getFollowRecordList({
- search_map: this.search_map,
+ await getRegisterList({
+ 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) => {
- 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
- }
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.count
+ if (res.data && res.data.length > 0) {
+ // const list = res.data.map((item) => {
+ // 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
+ // }
+ // })
+ this.tableList.tableInfomation = res.data || []
+ this.pagerOptions.totalCount = res.total
} else {
this.tableList.tableInfomation = []
}
@@ -165,7 +160,7 @@
},
// 鎼滅储
onFilterSearch(searchText) {
- this.search_map.client_name = searchText ?? ""
+ this.keyword = searchText ?? ""
this.pagerOptions.currPage = 1
this.getData()
},
@@ -181,23 +176,25 @@
},
// 缂栬緫
handleClick(row) {
- console.log(row)
- this.editConfig.title = "缂栬緫"
- let config=JSON.parse(JSON.stringify(row));
- config.client_status_id=config.client_status_id?config.client_status_id:null
- config.contact_information_id=config.contact_information_id?config.contact_information_id:null
- this.editConfig.infomation = { ...config, sale_chance_name:row.sale_chance.name, sales_leads_name: "" }
- this.editConfig.visible = true
+ this.$router.push({
+ path:"/productManage/silkRegisterForm/addPage",
+ query:{
+ id:row.ID,
+ activeName:'first',
+ inspectID:row.finenessCheckID,
+ title:'淇敼'
+ }
+ });
},
// 鍒犻櫎
delClick(id) {
- this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
+ this.$confirm("璇风‘璁ゆ槸鍚﹀垹闄わ紝鍒犻櫎鎿嶄綔涓嶅彲鎾ら攢?", "璀﹀憡", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
})
.then(() => {
- getDeleteFollowRecord({ ids: [id] }).then((response) => {
+ getDeleteRegister({ id: id }).then((response) => {
if (response.code === 200) {
this.$message.success("鍒犻櫎鎴愬姛")
this.getData()
--
Gitblit v1.8.0