From 8df0c5cc3a475778ef92020dd99aaec77cc2cc24 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期日, 28 四月 2024 14:18:11 +0800
Subject: [PATCH] 应发工资报表的前端开发
---
src/views/reportManage/productionReport/index.vue | 130 +++++++++++++++++++++++++++++++++++--------
src/views/reportManage/payableSalaryReport/index.vue | 7 +
2 files changed, 110 insertions(+), 27 deletions(-)
diff --git a/src/views/reportManage/payableSalaryReport/index.vue b/src/views/reportManage/payableSalaryReport/index.vue
index d5641ab..31c963f 100644
--- a/src/views/reportManage/payableSalaryReport/index.vue
+++ b/src/views/reportManage/payableSalaryReport/index.vue
@@ -12,12 +12,13 @@
>
<template slot="leftButton">
<div class="margin_right_20px" style="width:200px;">
- <el-date-picker v-model="object.date" style="width:100%"
+ <!-- <el-date-picker v-model="object.date" style="width:100%"
@change="onFilterSearch"
:clearable="false" type="month" placeholder="閫夋嫨鏃ユ湡"
:picker-options="pickerOptions"
value-format="yyyy-MM">
- </el-date-picker>
+ </el-date-picker> -->
+ <el-button size="small" type="primary" @click="exportBtnClick">瀵煎嚭</el-button>
</div>
</template>
</CommonSearch>
@@ -194,6 +195,8 @@
inputContent( prop, row, scope){
console.log(prop,'---',row,'---',scope)
},
+ // 瀵煎嚭
+ exportBtnClick() {}
}
}
</script>
diff --git a/src/views/reportManage/productionReport/index.vue b/src/views/reportManage/productionReport/index.vue
index 4542902..4b7aa28 100644
--- a/src/views/reportManage/productionReport/index.vue
+++ b/src/views/reportManage/productionReport/index.vue
@@ -1,15 +1,42 @@
<template>
<div class="productionRreport-container">
<div class="filter-card">
- <CommonSearch :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch">
+ <CommonSearch
+ :show-add="false"
+ :amount-view="false"
+ placeholder="璇疯緭鍏ュ叧閿瘝"
+ @searchClick="onFilterSearch"
+ >
<template slot="leftButton">
- <el-button size="small" type="primary" @click="exportBtnClick">瀵煎嚭</el-button>
+ <el-select
+ v-model="marketId"
+ placeholder="璇烽�夋嫨"
+ class="select-width margin_right_10px"
+ multiple
+ collapse-tags
+ >
+ <el-option
+ v-for="item in marketList"
+ :key="item.ID"
+ :label="item.name"
+ :value="item.ID"
+ >
+ </el-option>
+ </el-select>
+ <el-button size="small" type="primary" @click="exportBtnClick"
+ >瀵煎嚭</el-button
+ >
</template>
</CommonSearch>
</div>
<div class="body-card">
<div class="list-view">
- <TableCommonView ref="tableListRef" v-loading="loading" :table-list="tableList" @selTableCol="selTableCol">
+ <TableCommonView
+ ref="tableListRef"
+ v-loading="loading"
+ :table-list="tableList"
+ @selTableCol="selTableCol"
+ >
</TableCommonView>
</div>
<!-- <div class="btn-pager">
@@ -20,7 +47,9 @@
</template>
<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import { getAttendanceStatistic } from "@/api/employeeSalary/attendanceManage.js";
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin";
+import { getDictList } from "@/api/productManage/silkRegisterForm.js";
export default {
name: "productionReport",
props: {},
@@ -31,6 +60,8 @@
return {
loading: false,
tableList: {},
+ marketId: [],
+ marketList: [], //搴勫彛
tableColumn: [
{ label: "杞﹂棿", prop: "name", default: true },
{ label: "鏈虹粍", prop: "member_name" },
@@ -45,7 +76,7 @@
{ label: "绾ゅ害鍋忓樊", prop: "detail_address" },
{ label: "鏃ヤ骇閲�", prop: "client_status" },
{ label: "绛夌骇", prop: "contact_name" },
- { label: "缁煎悎绛夌骇", prop: "contact_phone" }
+ { label: "缁煎悎绛夌骇", prop: "contact_phone" },
],
showCol: [
"杞﹂棿",
@@ -61,50 +92,99 @@
"绾ゅ害鍋忓樊",
"鏃ヤ骇閲�",
"绛夌骇",
- "缁煎悎绛夌骇"
- ]
- }
+ "缁煎悎绛夌骇",
+ ],
+ };
},
created() {
- this.setTable()
+ this.getSelectDataList();
+ this.setTable();
+ this.getData();
},
methods: {
+ getSelectDataList() {
+ //搴勫彛
+ getDictList({
+ dictType: 0,
+ }).then((res) => {
+ if (res.code == 200) {
+ this.marketList = res.data || [];
+ }
+ });
+ },
setTable() {
this.tableList = {
selectIndex: true,
tableInfomation: [],
allcol: [],
showcol: this.showCol,
- tableColumn: this.setColumnVisible(this.showCol)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
- this.searchOptions = []
+ tableColumn: this.setColumnVisible(this.showCol),
+ };
+ this.tableList.allcol = this.tableList.tableColumn
+ .filter((ele) => !ele.default)
+ .map((ele) => ele.label);
+ this.searchOptions = [];
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
- const label = this.tableList.tableColumn[i].label
- const value = this.tableList.tableColumn[i].prop
- this.searchOptions.push({ value: value, label: label })
+ const label = this.tableList.tableColumn[i].label;
+ const value = this.tableList.tableColumn[i].prop;
+ this.searchOptions.push({ value: value, label: label });
}
},
setColumnVisible(showCol) {
return this.tableColumn.map((ele) => {
return {
...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
+ isShowColumn: showCol.includes(ele.label),
+ };
+ });
},
selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setColumnVisible(val)
+ this.showcol = val;
+ this.tableList.tableColumn = this.setColumnVisible(val);
+ },
+ // 璇锋眰鏁版嵁
+ async getData() {
+ this.loading = true;
+ await getAttendanceStatistic({
+ keyword: this.keyword,
+ month: "2024-04",
+ // page: this.pagerOptions.currPage,
+ // pageSize: this.pagerOptions.pageSize
+ })
+ .then((res) => {
+ if (res.code == 200) {
+ if (res.data.list && res.data.list.length > 0) {
+ const list = res.data.list.map((item) => {
+ return {
+ ...item,
+ };
+ });
+ this.tableList.tableInfomation = list || [];
+ this.pagerOptions.totalCount = res.total;
+ } else {
+ this.tableList.tableInfomation = [];
+ }
+ } else {
+ this.tableList.tableInfomation = [];
+ }
+ this.loading = false;
+ })
+ .catch((err) => {
+ console.log(err);
+ this.tableList.tableInfomation = [];
+ this.loading = false;
+ });
},
// 鎼滅储
onFilterSearch(searchText) {
- console.log(searchText)
+ this.keyword = searchText ?? "";
+ this.pagerOptions.currPage = 1;
+ this.getData();
},
// 瀵煎嚭
- exportBtnClick() {}
- }
-}
+ exportBtnClick() {},
+ },
+};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
--
Gitblit v1.8.0